Bien día a todos…
El problema que tengo es el siguiente tengo que hacer un código de barras (EAN-128) y añadirlo a un archivo en pdf.
Para generar el pdf estoy usando el código sugerido por GeoAvila
[URL="http://www.forosdelweb.com/f18/generar-codigo-barras-desde-php-219142/"]http://www.forosdelweb.com/f18/generar-codigo-barras-desde-php-219142/[/URL]
Y para generar el pdf uso el siguiente código
Código PHP:
<?php
require_once('tcpdf/config/lang/eng.php');
require_once('tcpdf/tcpdf.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
//$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
// remove default header/footer
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
//set auto page breaks
//$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$pdf->SetFont('helvetica', '', 10);
$pdf->AddPage('P', 'LEGAL');
$html .= '<h1>codigo de barras--></h1><br/>';
$html .= '<p><img src="barraean128.php"/></p>';
// output the HTML content
$pdf->writeHTML($html, true, 0, true, 0);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// reset pointer to the last page
//$pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('prueba.pdf', 'I');
//============================================================+
// END OF FILE
//============================================================+
?>
Pero al ejecutarlo no me muestra nada, no sé en qué me estoy equivocando o como podría hacer este proceso de otra forma