PHP Classes

File: examples/cancelled.php

Recommend this page to a friend!
  Classes of Amós Assis   CFE Printer   examples/cancelled.php   Download  
File: examples/cancelled.php
Role: Example script
Content type: text/plain
Description: Example script
Class: CFE Printer
Generate printable documents for sales in Brazil
Author: By
Last change:
Date: 1 year ago
Size: 426 bytes
 

Contents

Class file image Download
<?php

ini_set
("display_errors", 0);

require_once
'../vendor/autoload.php';

use
CfePrinter\Pdf\CfePdfGenerator;
use
CfePrinter\Xml\XmlReader;

$xmlString = file_get_contents('example.xml');
$xmlStringCanc = file_get_contents('example-canc.xml');

$xml = new XmlReader($xmlString);
$xmlCanc = new XmlReader($xmlStringCanc);

$pdf = new CfePdfGenerator($xml, true);
$pdf->setCancelCoupon($xmlCanc);

$pdf->getPDF('test.pdf');