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 (dialog.run())
{
printJobSettings.printerSettings('SysPrintForm');
adobeExe = WinAPI::findExecutable(dialogFileName.value());
adobeParm = strFmt(' /t "%1" "%2" "%3" "%4"',
dialogFileName.value(),
printJobSettings.printerPrinterName(),
printJobSettings.printerDriverName(),
printJobSettings.printerPortName());
winAPI::shellExecute(adobeExe, adobeParm);
}
}
-Harry
Good day! This post couldn't be written any better!
ReplyDeleteReading 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
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
ReplyDeleteWaow 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
ReplyDeleteYou can check this by the arranging, format, content and pictures in the changed over document. altocompresspdf.com
ReplyDeleteWe are truly thankful for your blog entry. You will discover a great deal of methodologies in the wake of going to your post. I was precisely scanning for. A debt of gratitude is in order for such post and please keep it up.
ReplyDeletemerge pdf online free