1. Go to this page and download the library: Download easybill/zugferd-php 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/ */
easybill / zugferd-php example snippets
use Easybill\ZUGFeRD\Reader;
$document = Reader::create()->getDocument('zugferd-file.xml');
echo $document->getHeader()->getId(); // Get invoice No.
use Easybill\ZUGFeRD\Builder;
use Easybill\ZUGFeRD\Model\Document;
$doc = new Document(Document::TYPE_COMFORT);
$doc->getHeader()->setId('RE1337'); // Set invoice No.
$xml = Builder::create()->getXML($doc);
echo $xml; // Zugferd XML.
use Easybill\ZUGFeRD2\Reader;
$xml = file_get_contents('factur-x.xml');
$obj = Reader::create()->transform($xml);