Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1375
  • Last Modified:

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

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
Mywoody
Asked:
Mywoody
1 Solution
 
sarabandeCommented:
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
 
MywoodyAuthor Commented:
Thank you
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now