Delphi/CB
•  Greatis •  Security •  AppDatabase •  Utilities •  Visual Basic • .NET •  just4fun
Delphi / C++ Builder
Components, utilities and tips for Delphi and C++ Builder developers
More info
Print Suite FAQ
Print Suite Home
Delphi Components
See also
Products
Form Designer
Object Inspector
Runtime Fusion
Commented Image
Image Editor  new!
Delphi Toys
Ultimate Pack  hot!

FAQs
Form Designer FAQ
Object Inspector FAQ
Image Editor FAQ

Links
Software for .NET
Software for VB 6
Delphi Tips & Tricks

Services
Outsourcing
Drawing with TPrintJob
To draw the graphics just use the passed TheCanvas and TheRect. The Target parameter can be used if you want to make the different output for printer and for preview. To call the WinAPI graphic functions just use the Handle property of TheCanvas parameter.
procedure TForm1.PrintJob1Draw(Sender: TObject; TheCanvas: TCanvas;
  PageIndex: Integer; TheRect: TRect; Area: TDrawArea;
  Target: TDrawTarget);
begin
  with TheCanvas,TheRect do
    if Area=daPage then
    begin
      // drawing the rectangle using TCanvas method
      Rectangle(Left,Top,Right,Bottom);
      // setting the font using TCanvas property
      Font.Size:=50;
      // drawing the text using WinAPI function
      // (the Handle property of TheCanvas is used)
      DrawText(Handle,'Print Suite',-1,TheRect,
        DT_SINGLELINE or DT_CENTER or DT_VCENTER);
    end;
end;

Greatis Software Greatis | Security | AppDatabase | Utilities | Delphi/CB | Visual Basic | .NET | just4fun

Contacts | Add to Favorites | Recommend to a Friend | Privacy Policy | Copyright © 1998-2008 Greatis Software