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

Accessiong TppCustomPrinter

edited October 2002 in General
The component TppCustomPrinter is defined in ppPrintr.pas. It has a
property for the currently in used printer that I would very much like
to have access to, namely, PageGutters (defined as TRect). From what
I can tell, my attempts to extract gutter information from the Delphi
defined Printer, using GetDeviceCaps, doesn't work when the printer is
changed on the preview screen.

However, TppCustomPrinter seems to be used in only
tppPrinterSetupDialog, tppPrinterFontDialog, and tppPrinterCanvas
(private only).

How can I access the gutter information?

TIA

Comments

  • edited October 2002
    You'll need to access the printer object on the print dialog, not the
    report. You can access the printer object in the OnPrintDialogClose event
    of the report like this:

    uses
    ppPrintr;

    procedure TmyEndUserSolution.ppReport1PrintDialogClose(Sender: TObject);
    begin
    TppPrinter(ppReport1.PrintDialog.Printer).PageGutters
    end;

    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.