PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: Danilo David on January 05, 2022, 09:01:44 PM

Title: .doc to .pdf
Post by: Danilo David on January 05, 2022, 09:01:44 PM
hello,

anyone who knows how to convert .doc file to pdf file using pxplus codes?

thanks, God bless
Title: Re: .doc to .pdf
Post by: EVa on January 06, 2022, 03:24:41 AM
Try this:

0010 ! Instantiate object
0020 LET W=NEW("*obj/word")
0030 !
0040 ! Open document
0050 LET PATH$="c:\temp\test.docx"
0060 LET DOC1=W'OPENDOCUMENT(PATH$)
0070 !
0080 ! SaveAs PDF file
0090 W'SAVEASDOCUMENT("c:\temp\nowpdf.pdf")
0100 !
0110 DROP OBJECT W
0120 END

-Eric-