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

Printing directly to pdf file

edited October 2007 in General
Hi, folks...

I need to print directly to pdf file!
Anybody help me?



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited October 2007
    Be sure ppPDFDevice (or the PDF driver you are using) is in your uses
    clause, and use the following code:

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ppReport1.AllowPrintToFile := True;
    ppReport1.DeviceType := TppPDFDevice.DeviceName; //or the device class
    you are using
    ppReport1.TextFileName := 'C:\Test.pdf';
    ppReport1.ShowPrintDialog := False;
    ppReport1.Print;
    end;

    Edward Dressel
    Team DM


This discussion has been closed.