1. Go to this page and download the library: Download horstoeko/orderx 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 / orderx example snippets
use horstoeko\orderx\OrderDocumentReader;
$document = OrderDocumentReader::readAndGuessFromFile(dirname(__FILE__) . "/order-x.xml");
$document->getDocumentInformation(
$documentNo,
$documentTypeCode,
$documentDate,
$documentCurrency,
$documentName,
$documentLanguageId,
$documentEffectiveSpecifiedPeriod,
$documentPurposeCode,
$documentRequestedResponseTypeCode)
echo "The Order No. is {$documentno}" . PHP_EOL;
use horstoeko\orderx\OrderDocumentPdfReader;
$document = OrderDocumentPdfReader::readAndGuessFromFile(dirname(__FILE__) . "/order-x.pdf");
$document->getDocumentInformation(
$documentNo,
$documentTypeCode,
$documentDate,
$documentCurrency,
$documentName,
$documentLanguageId,
$documentEffectiveSpecifiedPeriod,
$documentPurposeCode,
$documentRequestedResponseTypeCode)
echo "The Order No. is {$documentno}" . PHP_EOL;
use horstoeko\orderx\OrderProfiles;
use horstoeko\orderx\OrderDocumentBuilder;
use horstoeko\orderx\OrderDocumentPdfBuilder;
$document = OrderDocumentBuilder::createNew(
OrderProfiles::PROFILE_EXTENDED
);
$document
->setIsDocumentCopy(false)
->setIsTestDocument(false)
->setDocumentBusinessProcessSpecifiedDocumentContextParameter("A1")
->setDocumentInformation("PO123456789", "220", new \DateTime(), "EUR", "Doc Name", null, new \DateTime(), "9", "AC");
// Do some other stuff (see above)
$pdfDocument = new OrderDocumentPdfBuilder(
$document,
dirname(__FILE__) . "/../src/assets/empty.pdf"
);
$pdfDocument
->generateDocument()
->saveDocument(getcwd() . "/order-x.pdf");
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.