Solved

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

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

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

786 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