withDeterministic(new DeterministicSettings( new DateTimeImmutable('2026-07-24T00:00:00Z'), \str_repeat('b', 32), )); $doc = Document::createStandalone($config); $doc->setTitle('Barcode Edge Sample Sheet'); $doc->setPrintFooter(false); $doc->addPage(); $doc->setFont('helvetica', 'B', 18); $doc->setXY(24, 20); $doc->cell(0, 12, 'Barcode Edge Sample Sheet', newLine: true); $doc->setFont('helvetica', '', 9); $doc->setXY(24, 60); $doc->cell(360, 10, 'CELL aztec-structured-append:'); $doc->setXY(24, 72); $doc->cell(520, 10, 'Aztec / version=auto / ECC=23-percent / payload=HELLO+WORLD; SA=1/2+2/2; id=ORDER7'); $doc->write2DBarcodeWithOptions( 'HELLO', Barcode2DType::Aztec, symbolOptions: new AztecOptions(structuredAppend: ['index' => 1, 'total' => 2, 'id' => 'ORDER7']), x: 35, y: 100, w: 75, h: 75, ); $doc->write2DBarcodeWithOptions( 'WORLD', Barcode2DType::Aztec, symbolOptions: new AztecOptions(structuredAppend: ['index' => 2, 'total' => 2, 'id' => 'ORDER7']), x: 115, y: 100, w: 75, h: 75, ); $doc->setFont('helvetica', '', 9); $doc->setXY(24, 205); $doc->cell(250, 10, 'CELL bad-contrast:'); $doc->setXY(24, 217); $doc->cell( 250, 10, 'QR / version=auto / ECC=L / payload=NEXTPDF-BAD-CONTRAST; expected=no-detection', ); $doc->write2DBarcodeWithOptions( 'NEXTPDF-BAD-CONTRAST', Barcode2DType::QRCode, appearance: new BarcodeAppearance( quietZone: QuietZoneMode::Paint, foreground: Color::gray(250), background: Color::gray(251), ), x: 35, y: 245, w: 75, h: 75, ); $doc->setXY(24, 360); $doc->cell(250, 10, 'CELL tiny-module:'); $doc->setXY(24, 372); $doc->cell( 350, 10, 'QR / version=auto / ECC=L / payload=NEXTPDF-TINY-MODULE; expected=no-detection', ); $doc->write2DBarcodeWithOptions( 'NEXTPDF-TINY-MODULE', Barcode2DType::QRCode, x: 35, y: 400, w: 1.5, h: 1.5, ); $output = \getenv('NEXTPDF_SAMPLE_OUTPUT') ?: __DIR__ . '/../output/47-barcode-edge.pdf'; $doc->save($output); echo "Created: {$output}\n";