I am trying to print a pdf from my application using this osprint.p option, I am able to use the printer option of saving pdf but the pdf is not in a readable format This is how it looks. any idea what I am doing wrong. Also, is there any option to set a default printer through this along with other options like the number of copies, collate, etc, without triggering MSW Print Setup dialog box I want to programmatically send these options?. With the below 4th parameters I am able to do the orientation and the paper size but don't how to set others.
/* RUN ShellExecuteA (0,"print":u,cUserFile,"default_Printer","",1,OUTPUT tInt). */
/* Using ShellExecute I won't be able to set orientation or any other options */
RUN adecomm/_osPrint.p (INPUT wWin,
INPUT cUserFile,
INPUT 3,
INPUT 1 + IF fc-orient-portrait = 1 THEN 0 ELSE 2 + i-papersize + 160 + 512,
INPUT 0,
INPUT 0,
OUTPUT vResult).
IF vResult THEN DO:
OS-DELETE VALUE(cUserFile).
END.
For reference, I am using this article from Chris: https://www.progresstalk.com/threads/printing-on-ladscape-mode.48/ along with this one: https://knowledgebase.progress.com/articles/Knowledge/18776
Thanks Ahead.