tcpdf генерировать pdf417 2D штрих-код не может установить ширину

Я пытаюсь создать штрих-код с этими требованиями:

Barcode Type: PDF 417
Error Correction Length: 5
Module Height/Length: 2
Scanning Method: Document Scanner
Data Compaction: Byte Compaction (BC)

Barcode Measurements Points Inches
Module Width: 0.958pt            0.0133in
Actual Width of Barcode: 540pt               7.5in
Actual Height of Barcode: 108pt               1.5in

Я использую TCPDF, но не могу получить правильную ширину или высоту.

введите описание изображения здесь

Ниже мой php-код, может кто-нибудь помочь мне сделать ширину и высоту правильно, пожалуйста

$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'LETTER', true, 'UTF-8', false);

// remove default header/footer
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);

// add a page
$pdf->AddPage();

$txt = 'I-90|06/30/15|1|||||||||||||||||This is a message|';

// set style for barcode
$style = array(
'border' => 0,
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);

//write barcode
$pdf->write2DBarcode($txt, 'PDF417', 0, 10, 540, 108, $style, 'N');

//Close and output PDF document
$pdf->Output('example_002.pdf', 'I');

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector