Solved

PowerBuilder 12.5 : How to PrintPreview from PowerBuilder for  file with *.doc, *.excel, *.xls , .*txt ?

Posted on 2013-10-28
2
1,242 Views
Last Modified: 2013-11-14
After get  docname for attachment to send through mail, How can I PrintPreview  document without datawindow from  PowerBuilder ?  does anyone know how to make a call to Adobe Acrobat function Create PDF from file in PowerBuilder so that it can convert these file to PDF for view (those doc file with extension *.txt, *.doc, *.xlsx, *.excel  ...)

li_rtn = GetFileSaveName("Select File", &
                       docpath, docname[], "DOC", &                                      +      "PDF Files (*.PDF),*.PDF," &                   
       + "Text Files (*.TXT),*.TXT," &
       + "Doc Files (*.DOC),*.DOC," &                              
       + "All Files (*.*), *.*", &      
                                         default_dir, 18)

Thanks

MyWoody
0
Comment
Question by:Mywoody
2 Comments
 
LVL 32

Accepted Solution

by:
sarabande earned 500 total points
Comment Utility
as far as i know acrobat has no function to create pdf from doc.

that was done by using word automation and using an installed pdf printer (driver).

as far as i know, the only program beside of ms word that could read .doc files was openoffice. you may look for an openoffice library if you would like to call office functions  programmatically (first read the .doc file, then print it as pdf file).

if the input files are image files like .bmp, .png, +.gif, .jpg you could use imagemagick to convert them to pdf. you also could merge files with that tool. there are also a lot of pdf libraries which would do what you want though they would need to perform word automation to convert the word documents to pdf. that means you need ms office word installed at the pc.

Sara
0
 

Author Closing Comment

by:Mywoody
Comment Utility
Thank you
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now