PHP code example of horstoeko / zugferd-laravel
1. Go to this page and download the library: Download horstoeko/zugferd-laravel library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
horstoeko / zugferd-laravel example snippets
use horstoeko\zugferdlaravel\Facades\ZugferdLaravel;
$document = ZugferdLaravel::createDocumentInMinimumProfile();
$document = ZugferdLaravel::createDocumentInBasicProfile();
$document = ZugferdLaravel::createDocumentInBasicWlProfile();
$document = ZugferdLaravel::createDocumentInEN16931Profile();
$document = ZugferdLaravel::createDocumentInExtendedProfile();
$document = ZugferdLaravel::createDocumentInXRechnung22Profile();
$document = ZugferdLaravel::createDocumentInXRechnung23Profile();
$document = ZugferdLaravel::createDocumentInXRechnung30Profile();
$document = ZugferdLaravel::readXmlFromFile('/path/to/file.xml');
$document = ZugferdLaravel::readXmlFromString('<xml>...</xml>');
$document = ZugferdLaravel::readXmlFromPdfFile('/path/to/file.pdf');
$document = ZugferdLaravel::createDocumentInEN16931Profile();
$document
->setDocumentInformation("471102", "380", \DateTime::createFromFormat("Ymd", "20180305"), "EUR")
->....;
$pdfDataOrFilename = '/path/to/file.pdf';
$mergedPdfFilename = '/path/to/merged.pdf';
ZugferdLaravel::buildMergedPdfByDocumentBuilder($document, $pdfDataOrFilename, $mergedPdfFilename);
$xmlDataOrFilename = '/path/to/file.xml';
$pdfDataOrFilename = '/path/to/file.pdf';
$mergedPdfFilename = '/path/to/merged.pdf';
ZugferdLaravel::buildMergedPdfByXmlDataOrXmlFilename($xmlDataOrFilename, $pdfDataOrFilename, $mergedPdfFilename);
$xmlDataOrFilename = '<?xml version="1.0" encoding="UTF-8"
$xmlDataOrFilename = '/path/to/file.xml';
$pdfDataOrFilename = '%PDF-1.5....';
$mergedPdfFilename = '/path/to/merged.pdf';
ZugferdLaravel::buildMergedPdfByXmlDataOrXmlFilename($xmlDataOrFilename, $pdfDataOrFilename, $mergedPdfFilename);
$xmlDataOrFilename = '<?xml version="1.0" encoding="UTF-8"