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
Printing with TPrintJob
To print the print job just call the Print method of TPrintJob component. You don't need to use BeginDoc, NextPage and EndDoc methods of TPrinter object, just let TPrintJob to print your graphics.
procedure TForm1.PrintButtonClick(Sender: TObject);
begin
  PrintJob1.Print;
end;
If the MultiDoc property is True, each page will be printed as a separate document. This feature can be useful for printing the multipage jobs with large graphic files on each page, because some printer can fail such jobs due to internal memory limitations.

If you want to allow user to choose or setup the printer before printing, just use the PrintDialog method instead.

procedure TForm1.PrintButtonClick(Sender: TObject);
begin
  PrintJob1.PrintDialog;
end;
If you want to print only range of the page, use the PrintEx method of the TPrintJob component.

procedure PrintEx(
  StartPage,EndPage: Integer; // start and end page of printed range
  PrintMode: TPrintModes);    // set of print modes, see below

type
  TPrintMode = (
    pmReverse,     // print pages in reverse order
    pmMultiDoc);   // multidocumental mode, see MultiDoc ahead
  TPrintModes = set of TPrintMode;

...

procedure TForm1.PrintButtonClick(Sender: TObject);
begin
  PrintJob1.PrintEx(2,4,[]);
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