Security change on December 1, 2026: TLS 1.2 will become the minimum standard for 365 business Print Agent. Details and system requirements
365 business development
365 business PDF

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
ObsoleteState = Pending; ObsoleteReason = 'Use Pdf - Stationery, Pdf - Concatenate, Pdf - Sign codeunit instead.'; ObsoleteTag = '20.5';

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 methodReplacement
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
SignDocumentbdev.Pdf - Sign, same signature, plus overloads taking a PDF Signing Configuration
CreateZUGFeRDInvoice, CreateZUGFeRDInvoiceXmlNo 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
procedure CreateZUGFeRDInvoice(var document: Codeunit "Temp Blob"; invoice: Record "Sales Invoice Header") procedure CreateZUGFeRDInvoiceXml(invoice: Record "Sales Invoice Header"): Codeunit "Temp Blob"
ParameterTypeDescription
documentCodeunit "Temp Blob"The PDF of the invoice. It is replaced by the PDF with the ZUGFeRD XML embedded.
invoiceRecord "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.

See also

Last modified on