Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

PDF printint with showprintdialog = false

edited August 2007 in Devices
Hi

Is it possible to generate a PDF file setting showprintdialog = false?
I tryed in several ways getting all the time Access violation errors.
What I really would like to do was to save a report as a PDF file in the
more "silent" way:
no questions, screens, confirmations etc... is it possible ?

I am using RB 10.06 Standart Edition with Delphi 7

Thank you
Edison Garcia

Comments

  • edited August 2007
    > I am using RB 10.06 Standart Edition with Delphi 7

    Yes. And I will also head off the next question of how to do this :-)

    ppReport1.TextFileName := 'c:\TestFileName.pdf';
    ppReport1.DeviceType := 'PDF';
    ppReport1.ShowPrintDialog := False;
    ppReport1.ShowCancelDialog := False;
    ppReport1.Print;

    You need to have 'ppPDFDevice' in your uses clause (or what ever PDF driver
    you are using--and change the device type).

    Edward Dressel
    Team DM
  • edited August 2007
    Dear Edward

    It works perfectly. Thank you

    Edison Garcia

This discussion has been closed.