Solved

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

Posted on 2013-10-28
2
1,292 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 34

Accepted Solution

by:
sarabande earned 500 total points
ID: 39609525
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
ID: 39650392
Thank you
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

726 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