Datawindow to PDF in Powerbuilder 8

Posted on 2004-11-01
Last Modified: 2013-12-26

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?

- Roar
Question by:RoarEngen
    LVL 5

    Expert Comment

    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.

    LVL 33

    Expert Comment

    Check out the printer at
    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"

    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
    LVL 33

    Accepted Solution

    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')
    LVL 33

    Expert Comment

    A split would be the proper response

    Author Comment

    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

    913 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now