Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oetiker/pdf-qrcode
Package to add a qrcode method to the PDF::API2 and PDF::Builder classes.
https://github.com/oetiker/pdf-qrcode
pdf-generation perl qrcode-generator
Last synced: 2 months ago
JSON representation
Package to add a qrcode method to the PDF::API2 and PDF::Builder classes.
- Host: GitHub
- URL: https://github.com/oetiker/pdf-qrcode
- Owner: oetiker
- License: artistic-2.0
- Created: 2020-12-09T07:39:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-27T06:15:16.000Z (over 2 years ago)
- Last Synced: 2024-05-02T00:12:45.544Z (9 months ago)
- Topics: pdf-generation, perl, qrcode-generator
- Language: Perl
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
![](https://github.com/oetiker/pdf-qrcode/workflows/Unit%20Tests/badge.svg?branch=main)
# NAME
PDF::QRCode - add qrcode method to a PDF::API2 or PDF::Builder.
# SYNOPSIS
```perl
use PDF::API2; # or PDF::Builder
use PDF::QRCode;my $pdf = PDF::API2->new(-file=>'qr.pdf');
$pdf->mediabox('a4');
my $gfx = $pdf->page->gfx;
$gfx->qrcode(x => 100, y => 100,
level => 'L', size => 40, text => 'Hello World');
$pdf->save;
```# DESCRIPTION
The [PDF::QRCode](https://metacpan.org/pod/PDF%3A%3AQRCode) module monkey patches the 'qrcode' method into the
[PDF::API2::Content](https://metacpan.org/pod/PDF%3A%3AAPI2%3A%3AContent) or [PDF::Builder::Content](https://metacpan.org/pod/PDF%3A%3ABuilder%3A%3AContent) class, so that you can use it directly from there. See the example above## $gfx->qrcode(%cfg)
Adds a qr code to the given gfx content. It expects the following parameters:
- x
horizontal position
- y
vertical position
- size
width/height
- text
the content of the qrcode
- level (optional)
qr code level `L`, `M`, `Q`, `H`
# AUTHOR
Tobias Oetiker,
# COPYRIGHT
Copyright OETIKER+PARTNER AG 2020
# LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10 or,
at your option, any later version of Perl 5 you may have available.