1. Vaibhav Kak
  2. PowerBuilder
  3. Wednesday, 11 December 2019 12:17 PM UTC

Hi All,

I am working on Windows 7 platform. And printing a word document from an application created using PowerBuilder 2017. During this process i want to archive the same file in a physical directory in 'PDF' format. 

Is it possible in PowerBuilder 2017? Kindly suggest how this can be achieved.

Best regards,

Vaibhav

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 11 December 2019 12:29 PM UTC
  2. PowerBuilder
  3. # Permalink

If you have a recent verion of Word then you can open the document in word from in powerbuilder, using OLE and then doing a SaveAs choosing the PDF format.

 

Comment
  1. Miguel Leeuwe
  2. Thursday, 12 December 2019 13:04 PM UTC
That's great!
  1. Helpful
  1. Vaibhav Kak
  2. Thursday, 12 December 2019 13:15 PM UTC
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 12 December 2019 13:19 PM UTC
Very useful :)
  1. Helpful
There are no comments made yet.
Tobias Roth Accepted Answer Pending Moderation
  1. Friday, 13 December 2019 06:25 AM UTC
  2. PowerBuilder
  3. # 1

Hi,

here i have an example of our savetopdf-function.

It converts the most common microsoft office formats to pdf.

I hope that will help you.

I removed the trycatch-blocks for simplification, i recommend to add trycatch blocks when you call the oleobjects. 

smile

Attachments (1)
Comment
  1. Vaibhav Kak
  2. Friday, 13 December 2019 06:55 AM UTC
Thanks! Roth.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 13 December 2019 09:28 AM UTC
Nice!

I would add that personally I would not do "ole_doc.Visible = true" (if you don't want to see word showing the document, but just want to save as PDF).

regards
  1. Helpful
  1. Tobias Roth
  2. Friday, 13 December 2019 09:59 AM UTC
Thats correct, but when the word.exe crashes as background job the whole process hangs.

That was the easiest way to deal with that problem :-)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.