Axapta V/s Me

Yet another blog for Dynamics 365 for Finance and Operations. This blog primarily targets the technical readers. I will be sharing my experience with Dynamics AX using code snippets, errors, and solutions, Tips, and tricks.

Print PDF files from AX X++ code

Print External PDF file from AX 

This job illustrates how we can print an external PDF file to a printer chosen in AX through X++ code. Here a code sample (X++ job) to do this.

static void theAxapta_pdfprint(Args _args)
    PrintJobSettings    printJobSettings = new PrintJobSettings(); 
    Dialog              dialog = new Dialog(); 
    DialogField         dialogFileName; 
    str                 adobeExe; 
    str                 adobeParm; 
    dialogFilename  = dialog.addField(typeid(FilenameOpen));

    if ( 
        adobeExe = WinAPI::findExecutable(dialogFileName.value());
        adobeParm = strFmt(' /t "%1" "%2" "%3" "%4"',

        winAPI::shellExecute(adobeExe,  adobeParm); 



  1. Good day! This post couldn't be written any better!
    Reading this post reminds me of my good old
    room mate! He always kept chatting about this. I will forward this write-up to him.

    Pretty sure he will have a good read. Thanks for sharing!

    Also visit my weblog; rencontre femme cougar

  2. This online pdf merger or pdf combiner or pdf joiner will easily merge pdf files together with use of any software or any registration. pdf merge

  3. Waow this is quite pleasant article, my sister love to read such type of post, I am going to tell her and bookmarking this webpage. Thanks cheap post card printing

  4. You can check this by the arranging, format, content and pictures in the changed over document.



Note: Only a member of this blog may post a comment.