Pdf API (obsolete)
Codeunit 5523590 bdev.Pdf API was the single entry point of the app before version 20.5. It has been split into one codeunit per capability and is obsolete since then.
Code
Do not write new code against this codeunit
ObsoleteState = Pending means the codeunit still compiles, with a warning. It will be removed in a future major version. New code belongs on the codeunits listed below.
What to use instead
bdev.Pdf API method | Replacement |
|---|---|
ApplyStationeryToDocument (all five overloads) | bdev.Pdf - Stationery, same signatures |
ConcatenateDocument(Codeunit, Codeunit) | bdev.Pdf - Concatenate, same signature |
ConcatenateDocument(List of [Text]) | bdev.Pdf - Concatenate, same signature |
SignDocument | bdev.Pdf - Sign, same signature, plus overloads taking a PDF Signing Configuration |
CreateZUGFeRDInvoice, CreateZUGFeRDInvoiceXml | No replacement yet - see below |
The stationery and concatenate methods forward to the same implementation as their replacements, so moving a call over is a change of the variable declaration and nothing else.
The methods without a replacement
Signing moved to bdev.Pdf - Sign with 20.6. What remains on this codeunit without a replacement is the ZUGFeRD creation.
CreateZUGFeRDInvoice and CreateZUGFeRDInvoiceXml
Produce the ZUGFeRD / Factur-X representation of a posted sales invoice: the XML alone, or a PDF with the XML embedded.
Code
| Parameter | Type | Description |
|---|---|---|
document | Codeunit "Temp Blob" | The PDF of the invoice. It is replaced by the PDF with the ZUGFeRD XML embedded. |
invoice | Record "Sales Invoice Header" | The posted sales invoice the XML is built from. |
CreateZUGFeRDInvoiceXml returns the XML as a Temp Blob codeunit.
CreateZUGFeRDInvoiceXml builds the XML in Business Central and needs nothing else. CreateZUGFeRDInvoice embeds it into the PDF through the PDF service and needs the separately licensed ZUGFeRD feature of the app; the service call is made with a PDF A/3-U conformance level and version V2_1.
There is no counterpart for credit memos on this codeunit, although the app produces them during report processing.
