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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Italian e-Invoice - attaching a PDF to the XML when using a service provider

(2) ShareShare
ReportReport
Posted on by 27
HI
We are using the third party Arxivar to send our e-Invoices through to the Italian government site.  The files are created as xml and we have a requirement from our customers to also attach the invoice copies in pdf version.
We have done a customisation to the Electronic reporting > Configurations>Invoice model> Sales Invoice so that it does add a pdf but we find this only works if you run the invoices in print to screen mode at the point of creation which with a 100+ invoices is not a workable solution.
 
Has anyone got a working solution for adding the PDFs?
 
Thanks
Gill
I have the same question (0)
  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at
    You said you sent the file to a government site but it's the customer asking for extra data included in XML. Does XML schema defined by Italian government allow inclusion of such data? If so, you must follow the format their defined. If not, you'll need to tell the customer that the request doesn't make sense (and ask them to describe the business problem they're trying to solve, so you can suggest a feasible technical solution).
     
    In general, XML is a text format, while PDF is not. To include PDF in XML, you'd need to convert the binary data of PDF to text, typically with Base64 encoding. Then you can use this string as an element value.
  • GillOliver Profile Picture
    27 on at
    HI
     
    Thanks for the quick response.
     
    The government schema does allow for the inclusion of an XML, this is quite common in Italy where all invoices have to go through the government before arriving with the customer.
    The PDF does currently get converted to text as you describe.  This part seems to work ok but unfortunately only if you print the invoice to screen on creation first and as you can imagine that is not very useful if you are printing 100+ invoices at a time.
     
    Gill
  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at
    Okay, so you already have an implementation but it works only in some cases. To be able find a problem with your implementation, we'll need to know how you've implemented it. Also, please tell us what happens when you don't print it to screen? Do you get an error? An empty element? A wrong data?
  • GillOliver Profile Picture
    27 on at
    HI
     
    If the invoices are not printed to screen then the xml is still created but it does not include the pdf information.
     
    The change that we made so far is under the sales invoice invoice model configuration.  We created our own version of the Sales invoice and in the designer created  a new node of Formatto Attachement and in the formula transformation we have the instruction 
    • REPLACE(parameter,"application/pdf","pdf",false)
    Image
     
    so that we have that as a parameter in the String > Transformation
     
    Image
     
    Thanks
     
    Gill

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans