Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Datamatrix creation generate Notice: Undefined offset: [n_row] #13

@MrGabriCavi

Description

@MrGabriCavi

Hi,
during the generation of datamatrix code in FPDF istance the execution trig an notice error of undefined offset.
The datamatrix generated seems doesn't have any problem under read with an 2Dbarcode scanner.
I attach the code above

require_once('fpdf17/efpdf.php'); //FPDF with TextWithRotation method
require_once('php-barcode.php'); // The class :-)

$type = 'datamatrix';
$black = '000000';
$height = null;
$width = 0.7;
$angle = 0;

$pdf = new eFPDF();
$pdf->AddPage();

$x_barcode = 123;
$y_barcode = 49;

$barcode_string = "LYDAGAAVVISLTP0141002000158";

$codice = array('code'=>$barcode_string,'rect' => true);

$datamatrix = Barcode::fpdf($pdf, $black, $x_barcode , $y_barcode, $angle, $type, $codice , $width, $height);

$pdf->SetFont('Arial','',3);
$pdf->TextWithRotation($datamatrix['p4']['x'] + 1, $datamatrix['p4']['y'] + 2, $datamatrix['hri'], 0,0);

$pdf->Output("test.pdf");

Thanks for your attention

Gabri

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions