Example: printing chosen pages
Posted: 03/14/2004 13:02:46
There are two RVPrint's methods for printing:
- Print - prints all pages;
- PrintPages - prints the specified range of pages.
But what if you need to print several pages not belonging to a continuous
range, for example 1, 3, 4, 5, 23?
Of course, you can call PrintPages several times, but this will create
several printing jobs.
The procedure below solves this problem:
procedure PrintSomePages(const Title: String;
RVPrint: TRVPrint; const Pages: array of Integer);
var i: Integer;
Printer.Title := Title;
for i := Low(Pages) to High(Pages) do begin
if i<>Low(Pages) then
PrintSomePages('Test', RVPrint1, [1, 3, 4, 5, 23]);
Of course, RVPrint must be formatted (FormatPages) and must have at least 23
pages for this example.
Powered by ABC Amber Outlook Express Converter