Skip to main content

Notifications

Announcements

No record found.

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
  • GillOliver Profile Picture
    GillOliver 27 on at
    Italian e-Invoice - attaching a PDF to the XML when using a service provider
    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
  • Martin Dráb Profile Picture
    Martin Dráb 230,966 Most Valuable Professional on at
    Italian e-Invoice - attaching a PDF to the XML when using a service provider
    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
    GillOliver 27 on at
    Italian e-Invoice - attaching a PDF to the XML when using a service provider
    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
    Martin Dráb 230,966 Most Valuable Professional on at
    Italian e-Invoice - attaching a PDF to the XML when using a service provider
    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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans