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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.