zatca-qr-reader

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2023 License: GPL-3.0

README

ZATCA QR Reader

This is a Go based ZATCA E-Invoicing Phase 2 QR Code extraction and decoding tool that can extract the base64 encoded TLV (Tag Length Value) QR code and decode it to display information contained in it.

ZATCA (Zakat, Tax and Customs Authority) is a government organization of Saudi Arabia and has mandated the issuance of electronic invoices with UBL2.1 XML and base64 encoded TLV QR Codes.

This tool can be used by developers to quickly verify their own implementation of Phase 2 QR Code generation or simply extract and view QR Code from any ZATCA E-Invoice.

This tool (with the desktop app) can also be used by non technical people to extract and view contents of QR code from a variety of inputs.

Features

CLI Program
Feature Implemented
Decode from base64 string
Decode from a PNG/JPG image file
Extract and decode from a PDF file
Extract and decode from an XML file
Desktop App

Coming Soon 😃

Usage

  1. Download the binary from the latest release
  2. Rename the binary if needed
  3. Open a shell or command prompt and run the binary with arguments
# Decode directly from Base64 encoded TLV
decode_qr_code.exe ARNBY21lIFdpZGdldOKAmXMgTFREAg8zMT...

# Extract and decode from a PDF invoice
decode_qr_code.exe path/to/invoice.pdf

# Extract and decode from an XML invoice
decode_qr_code.exe path/to/invoice.xml

# Extract and decode from a png or jpg image
decode_qr_code.exe path/to/qr.png

Build

# Build platform: linux, Target platform: windows
GOOS=windows GOARCH=amd64 go build -ldflags="-X main.VERSION=$(git describe --tags --abbrev=0)" ./cmd/decode_zatca_qr/

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL