Datawindow to PDF in Powerbuilder 8

Hi

I am trying to find a way to export a report(DataWindow) to a PDF, but all solutions that I can find on the web is in Powerbuilder 9 or 10. Anybody know if it can be done in Powerbuilder 8, and how?

Thanks
- Roar
RoarEngenAsked:
Who is Participating?
 
sajuksConnect With a Mentor Commented:
The key to pdf printing from pb is to remember to've pdf driver installed and
to set the pdf printer.

dw_main.modify("Datawindow.printer = 'Adobe Acrobat writer')
dw_main.print()
0
 
michaelstoffelCommented:
In 8 you need to print to a PDF driver.  Many people use Amyuni, CutePDF, or Acrobat.  Change your printer to the PDF "printer", print the dw, then change the printer back.

Mike
0
 
sajuksCommented:
Check out the printer at http://www.powerwhizz.com/
We've used it in many places wherev'r the clinet required pdf printing ( prior to pb9)
You need to install pdf driver.

Also you can try the below code
// to print without user intervn you need to do some changes in registry
String ls_reg
ls_reg = "HKEY_CURRENT_USER\Software\Adobe\Acrobat PDFWriter"
RegistrySet(ls_reg, "PDFFileName", RegString!, "C:\printmypdf.pdf")
RegistrySet(ls_reg, "bDocInfo", RegString!, "0")
After that,
dw_main.object.datawindow.printer = "Acrobat PDFWriter"
dw_main.print()

Thats it, The example above assumes you've Acrobat PDFWrite as the printer name and adobe installed, the full version
If you purchase amyuni,pdf995,cutepdf you can change the name to the corresponding printer.
You will alos have to change the default printer back as per req
0
 
sajuksCommented:
A split would be the proper response
0
 
RoarEngenAuthor Commented:
Sorry, I missunderstod how it worked, I thought points were awarded automatically to those who responded. I have awarded the points to you sajuks because the combination of your two posts where the ones that solved the problem for me, thank you very much!
0
All Courses

From novice to tech pro — start learning today.