1PDF::API2::Resource::XOUbsjePerDcFtC::o::nAFtPorIri2mb::u::tRBeeadsroCPuoerdrcele:::D:qoXrcOcubomjdeeenc(tt3a:)t:iFoonrm::BarCode::qrcode(3)
2
3
4

NAME

6       PDF::API2::Resource::XObject::Form::BarCode::qrcode - Generate QR codes
7

SYNOPSIS

9           use PDF::API2;
10
11           my $pdf = PDF::API2->new();
12           my $page = $pdf->page();
13
14           # Create a QR Code object
15           my $barcode = $pdf->barcode('qr', code => 'This is a test');
16
17           # Calculate the scale needed for a desired size (72pt / inch)
18           my $desired_inches = 2;
19           my $scale = $desired_inches * 72 / $barcode->width();
20
21           # Place the QR Code one inch (72pt) from the bottom left corner
22           $page->object($barcode, 72, 72, $scale);
23
24           $pdf->save('qr_test.pdf');
25

REQUIREMENTS

27       Text::QRCode is used to encode QR codes.
28

OPTIONS

30           my $barcode = $pdf->barcode('qr', $value, %options);
31
32       The following standard barcode options are supported, as described in
33       "barcode" in PDF::API2:
34
35       •   bar_width (default: 1; unit is points)
36
37       •   bar_height (default: bar width)
38
39       •   quiet_zone (default: 4x bar width)
40
41       •   color (default: black)
42
43       The following options are specific to QR codes:
44
45       •   error_correction (default: L)
46
47           The QR Code Error Correction Level.  Higher levels of error
48           correction generate larger bar codes but remain scannable when
49           parts of the code are damaged or obscured.
50
51           In increasing order of error correction, the possible values are:
52
53           •   L (7%)
54
55           •   M (15%)
56
57           •   Q (25%)
58
59           •   H (30%)
60
61       •   version (default: 0)
62
63           If you need a specific version of QR Code, enter it here.
64           Otherwise, the minimum version will be used that can support the
65           encoded value.
66
67       •   mode (default: 8-bit)
68
69           You can generate smaller QR codes if you're using a restricted
70           character set:
71
72           •   8-bit (typically the ISO-8859-1 character set)
73
74           •   kanji
75
76           •   alphanumeric (digits, uppercase letters, space, or "$ % * + - .
77               / :")
78
79           •   numeric (digits)
80
81       •   case_sensitive (default: 1)
82
83           Whether 8-bit characters should be treated in a case-sensitive
84           manner.
85
86
87
88perl v5.36.0            PDF::API2:2:0R2e3s-o0u1r-c2e0::XObject::Form::BarCode::qrcode(3)
Impressum