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
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
The code in EPSendDocument\makeDocument() does exactly what you are asking. You will need a report, probably SalesInvoice in this case.
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.
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156