NAME

Health::SHC::Extract - Extract Smart Health Card QR codes from PDFs or png files.

SYNOPSIS

use Health::SHC::Extract;

my $shc = Health::SHC::Extract->new();

my @qrcodes = $shc->extract_qr_from_pdf('t/sample-qr-code.png');

my @qrcodes = $shc->extract_qr_from_png('t/sample-qr-code.png');

DESCRIPTION

This perl module can extract a Smart Health Card's data from QR codes in PDFs or image files.

The extract_qr_from_pdf function converts a pdf to a png and then calls extract_qr_from_png.

PREREQUISITES

METHODS

new(...)

Constructor; see OPTIONS above.

extract_qr_from_pdf($filename)

Extracts any Smart Health Card URI data from the QR codes found in the PDF file. It converts the PDF to a png file and extracts the URIs from the image file by calling extract_qr_from_png.

Arguments: $filename: string filename of a pdf file.

Returns: ARRAY shc:/ URI from QR code

extract_qr_from_png($filename)

Extracts any Smart Health Card URI data from the QR codes found in a png file.

Returns an array of shc:/ URIs

Arguments: $filename: string filename of a png file.

Returns: ARRAY shc:/ URI from QR code