-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
HorstOeko
committed
Dec 31, 2024
1 parent
42d23d7
commit 3d2dece
Showing
4 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
```php | ||
|
||
// Change the author of the generated (merged) PDF | ||
|
||
// This method accepts a free text that can accept the following placeholders: | ||
// - %1$s .... contains the invoice number (is extracted from the XML data) | ||
// - %2$s .... contains the type of XML document, such as ‘Invoice’ (is extracted from the XML data) | ||
// - %3$s .... contains the name of the seller (extracted from the XML data) | ||
// - %4$s .... contains the invoice date (extracted from the XML data) | ||
|
||
// The follwing example will generate: Issued by seller with name Lieferant GmbH | ||
|
||
$zugferdDocumentPdfBuilder = ZugferdDocumentPdfBuilder::fromPdfFile($zugferdDocumentBuilder, '/tmp/existingprintlayout.pdf'); | ||
$zugferdDocumentPdfBuilder->setAuthorTemplate('Issued by seller with name %3$s'); | ||
$zugferdDocumentPdfBuilder->generateDocument(); | ||
$zugferdDocumentPdfBuilder->saveDocument('/tmp/merged.pdf'); | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
```php | ||
|
||
// Change the keywords of the generated (merged) PDF | ||
|
||
// This method accepts a free text that can accept the following placeholders: | ||
// - %1$s .... contains the invoice number (is extracted from the XML data) | ||
// - %2$s .... contains the type of XML document, such as ‘Invoice’ (is extracted from the XML data) | ||
// - %3$s .... contains the name of the seller (extracted from the XML data) | ||
// - %4$s .... contains the invoice date (extracted from the XML data) | ||
|
||
// The follwing example will generate: R-2024/00001, Invoice, Lieferant GmbH, 2024-12-31 | ||
|
||
$zugferdDocumentPdfBuilder = ZugferdDocumentPdfBuilder::fromPdfFile($zugferdDocumentBuilder, '/tmp/existingprintlayout.pdf'); | ||
$zugferdDocumentPdfBuilder->setKeywordTemplate('%1$s, %2$s, %3$s, %4$s'); | ||
$zugferdDocumentPdfBuilder->generateDocument(); | ||
$zugferdDocumentPdfBuilder->saveDocument('/tmp/merged.pdf'); | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
```php | ||
|
||
// Change the subject of the generated (merged) PDF | ||
|
||
// This method accepts a free text that can accept the following placeholders: | ||
// - %1$s .... contains the invoice number (is extracted from the XML data) | ||
// - %2$s .... contains the type of XML document, such as ‘Invoice’ (is extracted from the XML data) | ||
// - %3$s .... contains the name of the seller (extracted from the XML data) | ||
// - %4$s .... contains the invoice date (extracted from the XML data) | ||
|
||
// The follwing example will generate: Invoice-Document, Issued by Lieferant GmbH | ||
|
||
$zugferdDocumentPdfBuilder = ZugferdDocumentPdfBuilder::fromPdfFile($zugferdDocumentBuilder, '/tmp/existingprintlayout.pdf'); | ||
$zugferdDocumentPdfBuilder->setSubjectTemplate('%2$s-Document, Issued by %3$s'); | ||
$zugferdDocumentPdfBuilder->generateDocument(); | ||
$zugferdDocumentPdfBuilder->saveDocument('/tmp/merged.pdf'); | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
```php | ||
|
||
// Change the title of the generated (merged) PDF | ||
|
||
// This method accepts a free text that can accept the following placeholders: | ||
// - %1$s .... contains the invoice number (is extracted from the XML data) | ||
// - %2$s .... contains the type of XML document, such as ‘Invoice’ (is extracted from the XML data) | ||
// - %3$s .... contains the name of the seller (extracted from the XML data) | ||
// - %4$s .... contains the invoice date (extracted from the XML data) | ||
|
||
// The follwing example will generate: Lieferant GmbH : Invoice R-2024/00001 | ||
|
||
$zugferdDocumentPdfBuilder = ZugferdDocumentPdfBuilder::fromPdfFile($zugferdDocumentBuilder, '/tmp/existingprintlayout.pdf'); | ||
$zugferdDocumentPdfBuilder->setTitleTemplate('%3$s : %2$s %1$s'); | ||
$zugferdDocumentPdfBuilder->generateDocument(); | ||
$zugferdDocumentPdfBuilder->saveDocument('/tmp/merged.pdf'); | ||
|
||
``` |