Receipt PDF Download
Basics
An existing receipt can be downloaded as a PDF document. The implementation is demonstrated in the following example file:
./examples/document/receipt/get_receipt_pdf.php
To download the receipt PDF, follow these steps:
// Download based on receipt number:
$agent->getReceiptPdf('NYGTA-2021-001');
// The response is a PDF type receipt, which can be downloaded as follows:
$result->downloadPdf(fileName);
The filename is optional. If not provided, the receipt number will be used as the filename for the PDF.
Expected and Optional Inputs
Receipt Header Data
Megnevezés | Mező | Típus | Kötelező | Alapérték |
---|---|---|---|---|
Receipt number | receiptNumber | string | yes | |
PDF template | pdfTemplate | string |