THPDFViewer Current View Printing
Draws or prints the current vector view with centred aspect-preserving fit
Declarations
function HPDFViewerFitRect(const Bounds: TRect; ContentWidth, ContentHeight: Integer): TRect;
function THPDFViewerModel.DrawCurrentView(Canvas: TCanvas; const Bounds: TRect; DPI: Integer= 150): boolean;
function THPDFViewerModel.PrintCurrentView(Printer: TPrinter; const DocumentTitle: string= ''; DPI: Integer= 300): boolean;Behaviour
ViewRotationare preserved through the vector metafile pathDrawCurrentViewaccepts any caller-ownedTCanvasand bounds- The active page and
ViewRotationare preserved through the vector metafile path PrintCurrentViewfits the result to the printer page and optionally assigns the print job title- A failed draw aborts an active print job before returning or propagating an exception
Example
PDFViewer.PrintCurrentView(Printer, 'Current PDF view', 300);