<?php
$file='/var/www/html/comercialandes.cl/ventas/timbre.xml';
$f=fopen($file,'r'); 
$data=''; 
while(!feof($f)) 
    $data.=fread($f,1); 
fclose($f); 

//echo $data;


require_once('/var/www/html/comercialandes.cl/tcpdf/examples/barcodes/tcpdf_barcodes_2d_include.php');

// set the barcode content and type

$barcodeobj = new TCPDF2DBarcode($data, 'PDF417');

// output the barcode as PNG image
$timbre=$barcodeobj->getBarcodePNG(4, 4, array(0,0,0));

$fp = fopen('timbre.png', 'w');
fwrite($fp, $timbre);
fclose($fp);

//============================================================+
// END OF FILE
//============================================================+
?>
