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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to print invoices to file (e.g. PDF) in AX 2009?

(0) ShareShare
ReportReport
Posted on by 1,087

Hi,

i'm new to AX 2009. 

 

I'm looking for a way to put invoices into PDF files. 

I've browsed through EPSendDocument (it looks deprecated, isnt it?), PrintJobSettings, but can't find the proper way to do that. 

 

At the moment i've got CustInvoiceJour table as the result of a query. How do I print each invoice to PDF file via code?

I've seen many solutions with reports, but i don't have any report available, and don't want to use it if possible. 

 

Thank you for your help

ciao

*This post is locked for comments

I have the same question (0)
  • Nielsen Tom Profile Picture
    115 on at
    Re: How to print invoices to file (e.g. PDF) in AX 2009?

    Hi,

    Please feel free to take a look at Liaison Messener EDD,     www.liaisonsc.com

    Messenger EDD automates busines form and report distribution and uses your existing AX reports. The end user selects either a batch or a single Invoice through your normal print process in Dynamics AX but now uses our Messenger EDD print driver and Messenger will then distribute the Invoices based on rules you set up at initial configuration.

    For example, through the single print selection:

    - Distribute Invoices to the customers preference (print, fax, or email) if email, it attaches a PDF

    - Archive a copy to desired folder

    - Print a hard copy to attach to other paperwork

    - Attach a static attachment like terms and conditions

    PDF creation is included with the product.

    Set up similar rules for Sales Orders, PO's, Statements or even shipping documents like Packing Slips, Picking Tickets, Bills of Lading and International docs.

    Please reach me at tom@liaisonsc.com or 714.543.9877x201 if you have any questions or would like to view an on-line demonstration.

    Best Regards,

    Tom Nielsen

    Liaison Software

    714.543.9877x201

    www.liaisonsc.com

  • Julie Johnsey Profile Picture
    570 on at
    Re: How to print invoices to file (e.g. PDF) in AX 2009?

    When yo print the report manually, you get the option to print the report to a file.  PDF is one of the file options.  I don't know how to tell you to set up a batch job to make this happen automatically, but it can be done.  Also, you can make screens print int a PDF format.

  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at
    Re: How to print invoices to file (e.g. PDF) in AX 2009?

    The code in EPSendDocument\makeDocument() does exactly what you are asking.  You will need a report, probably SalesInvoice in this case.

  • Community Member Profile Picture
    on at
    RE: How to print invoices to file (e.g. PDF) in AX 2009?

    Hi,

    Just a heads up regarding the use of EPSendDocument class:

    If you intent to use this class as generator for creating pdf invoices run in batch, the handlement of the temp files (gets created when the AOS service account runs the code, where it collects printer settings and building up the actual pdf) does not get deleted. The files are located on the batch AOS server, under: C:\Users\AOSSERVICEACCOUNTNAME\AppData\Local\Temp\

    I experienced this to be a problem, since that folder eventually got full of files and the logic was unable to draw a new name for the temp file (uses a sort of HEX-logic, and it goes up to FFFFFF).

    The solution for this, is either clear this folder by a scheduled job (windows bat-file), or use different approach in the code, which I suggest, since it isn´t best practice to generate a lot of files, and use a different handlement to delete these files.

    I would have a look at the class: PDFViewer, since that class handles the delete of the temp files, as well as the handle of either client base runs, or run in batch.

    //Richard Hellstenius

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans