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

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

Open
MrGabriCavi opened this issue Oct 2, 2014 · 1 comment
Open

Comments

@MrGabriCavi
Copy link

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

@AlphaOne89
Copy link
Collaborator

#17

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants