C# Class Patagames.Pdf.Net.Controls.Wpf.PdfPrintDocument

Defines a reusable object that sends output to a printer, when printing from a Windows Forms application.
Inheritance: System.Drawing.Printing.PrintDocument
Show file Open project: Patagames/Pdf.Wpf

Public Methods

Method Description
PdfPrintDocument ( PdfDocument Document, int mode ) : Patagames.Pdf.Enums

Initializes a new instance of the PdfPrintDocument class.

Protected Methods

Method Description
OnBeforeRenderPage ( PdfPage page, double width, double height, PageRotate rotation ) : void

Raises the BeforeRenderPage event.

OnBeginPrint ( System.Drawing.Printing.PrintEventArgs e ) : void

Raises the System.Drawing.Printing.PrintDocument.BeginPrint event. It is called after the System.Drawing.Printing.PrintDocument.Print method is called and before the first page of the document prints.

OnEndPrint ( System.Drawing.Printing.PrintEventArgs e ) : void

Raises the System.Drawing.Printing.PrintDocument.EndPrint event. It is called when the last page of the document has printed.

OnPrintPage ( System.Drawing.Printing.PrintPageEventArgs e ) : void

Raises the System.Drawing.Printing.PrintDocument.PrintPage event. It is called before a page prints.

Private Methods

Method Description
CalcRotation ( IntPtr currentPage, bool isLandscape, double &width, double &height ) : PageRotate
CalcSize ( IntPtr currentPage, double dpiX, double dpiY, RectangleF printableArea, bool isLandscape, double &width, double &height ) : void
GetRenderSize ( SizeF pageSize, SizeF fitSize ) : SizeF
InitDocument ( ) : IntPtr

Method Details

OnBeforeRenderPage() protected method

Raises the BeforeRenderPage event.
protected OnBeforeRenderPage ( PdfPage page, double width, double height, PageRotate rotation ) : void
page PdfPage The pagewhat will be printed.
width double The page's width calculated to match the sheet size.
height double The page's height calculated to match the sheet size.
rotation PageRotate The page rotation.
return void

OnBeginPrint() protected method

Raises the System.Drawing.Printing.PrintDocument.BeginPrint event. It is called after the System.Drawing.Printing.PrintDocument.Print method is called and before the first page of the document prints.
protected OnBeginPrint ( System.Drawing.Printing.PrintEventArgs e ) : void
e System.Drawing.Printing.PrintEventArgs A System.Drawing.Printing.PrintEventArgs that contains the event data.
return void

OnEndPrint() protected method

Raises the System.Drawing.Printing.PrintDocument.EndPrint event. It is called when the last page of the document has printed.
protected OnEndPrint ( System.Drawing.Printing.PrintEventArgs e ) : void
e System.Drawing.Printing.PrintEventArgs A System.Drawing.Printing.PrintEventArgs that contains the event data.
return void

OnPrintPage() protected method

Raises the System.Drawing.Printing.PrintDocument.PrintPage event. It is called before a page prints.
protected OnPrintPage ( System.Drawing.Printing.PrintPageEventArgs e ) : void
e System.Drawing.Printing.PrintPageEventArgs A System.Drawing.Printing.PrintPageEventArgs that contains the event data.
return void

PdfPrintDocument() public method

Initializes a new instance of the PdfPrintDocument class.
public PdfPrintDocument ( PdfDocument Document, int mode ) : Patagames.Pdf.Enums
Document PdfDocument The document to print
mode int Reserved. Must be zero.
return Patagames.Pdf.Enums