The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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.pdf');

    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

COPYRIGHT

The following copyright notice applies to all the files provided in this distribution, including binary files, unless explicitly noted otherwise.

Copyright 2021 Timothy Legge <timlegge@cpan.org>

LICENCE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

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