Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

Print invoice to file with EPSendDocument

Posted on by 1,085

Hi, 

i'm trying to save invoices to PDF file with the EPSendDocument object. 

But i can't find a way to set the printer. When the makeDocument method is called, i get a "printer is not installed" infolog error.

 

Here's my code:

 

    EPSendDocument sendDocument;

    CustInvoiceJour custInvoiceJour;

    Filename filename;

    ;

 

    select firstonly custInvoiceJour;

 

    filename = WinAPI::getTempPath() +’MyInvoice.pdf’;

    sendDocument = new EPSendDocument(custInvoiceJour);

    sendDocument.parmOriginal(true);

    sendDocument.parmFileName(filename);

    sendDocument.makeDocument(); 

 

Thank you in advance

ciao

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,326 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,166 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans