Use the ArchiveReader's OnInitializePrinterSetup event. You can set the printer setup in this event, but you'll have to rearrange the draw commands on each page to fit for the orientation. The archive is generated for a specific output format. There is no event on the ArchiveReader to change the draw commands, on a page by page basis. You may be able to use the ScreenDevice's OnReceivePage public event to alter the draw commands on the page. Setup this event assignment in the OnPreviewFormCreate event of the ArchiveReader: TppViewer(ppArchiveReader1.PreviewForm.Viewer).ScreenDevice
procedure Tfrm0151.ppArchiveReader1InitializePrinterSetup(Sender: TObject); begin
if (ppArchiveReader1.PrinterSetup.Orientation = poLandscape) then ShowMessage('Landscape') else ShowMessage('Portrait');
Comments
printer setup in this event, but you'll have to rearrange the draw commands
on each page to fit for the orientation. The archive is generated for a
specific output format. There is no event on the ArchiveReader to change the
draw commands, on a page by page basis. You may be able to use the
ScreenDevice's OnReceivePage public event to alter the draw commands on the
page. Setup this event assignment in the OnPreviewFormCreate event of the
ArchiveReader:
TppViewer(ppArchiveReader1.PreviewForm.Viewer).ScreenDevice
procedure Tfrm0151.ppArchiveReader1InitializePrinterSetup(Sender: TObject);
begin
if (ppArchiveReader1.PrinterSetup.Orientation = poLandscape) then
ShowMessage('Landscape')
else
ShowMessage('Portrait');
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com