web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

PDF/A-3 embedded with XML

(1) ShareShare
ReportReport
Posted on by 26
hi,
how to print the Project invoices with PDF/A-3 embedded with XML we already integrated with ZATCA Phase 2, but the invoices is PDF 'PDF/A-1B'
Screenshot 2026-02-12 100332.jpg
Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    306,854 Super User 2026 Season 2 on at
    Hi Abdullatif,
     
    Can you please clarify which product you are using and the question is related to? You added all product tags.

     
    Please remove all, except the product your question is related to.
  • Abdullatif Abusamra Profile Picture
    26 on at
     
    i updated D365 F&O
     
  • André Arnaud de Calavon Profile Picture
    306,854 Super User 2026 Season 2 on at
    Hi Abdullatif,

    Thanks for the clarification that it is about Dynamics 365 F&O. Let's await a reply from another volunteer as I don't have experience with ZATCA.
  • Suggested answer
    CU07080823-5 Profile Picture
    2 on at

    Hi Abdullatif,

    Short answer: F&O won't give you PDF/A-3 out of the box. Neither the SSRS print path nor the ER (Electronic reporting) PDF output supports embedded file attachments, which is exactly why you land on PDF/A-1b. The XML side — the signed / cleared invoice plus the TLV QR — comes from the Electronic invoicing add-on, and the two artifacts are simply never merged. So this is a development task rather than a setting, and the design decision that matters most is where you do the merge.

    1. Get the timing right before you write any code.

    For standard (B2B) tax invoices, the XML you embed has to be the ZATCA-cleared document returned by the clearance call — not the one you signed locally. That means the PDF/A-3 must be produced after the Electronic invoicing service reports successful clearance, not at posting time. For simplified (B2C) invoices you can generate immediately and embed the signed XML, since those are reported within 24 hours. If you keep printing at posting, you'll ship PDFs with the wrong XML inside them, and that only surfaces during an audit.

    2. Do the merge outside the AOS.

    Take the ER/SSRS PDF/A-1b plus the cleared XML and post-process them in an Azure Function (or Logic App) using a library with real PDF/A-3 support — iText 7 and PDFBox both handle it. Then push the result back into F&O as a document attachment (DocuRef) on the invoice journal, or into blob storage if your archive lives outside. Doing it in-process through an X++ → .NET class library reference also works, but keeping it as a separate service makes the ZATCA retry / resubmit logic far easier to live with, and lets you re-generate a PDF without touching the ERP.

    3. The PDF/A-3 conformance details are where these projects usually lose time:

    • the file spec needs /AFRelationship (use /Data for the invoice XML) and /Subtype /application#2Fxml

    • the attachment must be registered both in /Names → /EmbeddedFiles and in the catalog-level /AF array — add page-level /AF too if your validator is strict

    • XMP metadata must carry pdfaid:part = 3 and pdfaid:conformance = B; if you add invoice-specific metadata you also need a declared XMP extension schema

    • everything PDF/A-1b already required still applies: fully embedded fonts, an output intent with an ICC profile, no transparency

    The good news is that since your current output is already PDF/A-1b, you're starting from a compliant base — you're mostly adding attachment plumbing and bumping the conformance level, not reworking the report itself.

    4. Validate in two places, ideally in CI.

    veraPDF for PDF/A-3B conformance, and the ZATCA SDK validator for the embedded XML. A file that opens perfectly in Acrobat can still fail veraPDF, and veraPDF is the one that counts.

    One thing worth confirming before you build: check the current version of the ZATCA e-invoicing specification on whether PDF/A-3 is actually mandated for your invoice type or only permitted as the human-readable form. That determines whether this is a hard compliance requirement or an internal archiving improvement — and it changes how much you invest in it.

    Happy to go deeper on the merge step if you share how you're currently triggering the print.

    — PixelPlex team — custom software development & enterprise integrations https://pixelplex.io/services/custom-software-development-company/

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 341 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 312

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 262 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans