C# Class PdfSharp.Drawing.XPdfForm

Represents a so called 'PDF form external object', which is typically an imported page of an external PDF document. XPdfForm objects are used like images to draw an existing PDF page of an external document in the current document. XPdfForm objects can only be placed in PDF documents. If you try to draw them using a XGraphics based on an GDI+ context no action is taken if no placeholder image is specified. Otherwise the place holder is drawn.
Inheritance: PdfSharp.Drawing.XForm
Datei anzeigen Open project: XpsToPdf/XpsToPdf Class Usage Examples

Public Methods

Method Description
FromFile ( string path ) : XPdfForm

Creates an XPdfForm from a file.

FromStream ( Stream stream ) : XPdfForm

Creates an XPdfForm from a stream.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Frees the memory occupied by the underlying imported PDF document, even if other XPdfForm objects refer to this document. A reuse of this object doesn't fail, because the underlying PDF document is re-imported if necessary.

Private Methods

Method Description
Finish ( ) : void

Sets the form in the state FormState.Finished.

XPdfForm ( Stream stream ) : System

Initializes a new instance of the XPdfForm class from a stream.

XPdfForm ( string path ) : System

Initializes a new instance of the XPdfForm class from the specified path to an external PDF document. Although PDFsharp internally caches XPdfForm objects it is recommended to reuse XPdfForm objects in your code and change the PageNumber property if more than one page is needed form the external document. Furthermore, because XPdfForm can occupy very much memory, it is recommended to dispose XPdfForm objects if not needed anymore.

Method Details

Dispose() protected method

Frees the memory occupied by the underlying imported PDF document, even if other XPdfForm objects refer to this document. A reuse of this object doesn't fail, because the underlying PDF document is re-imported if necessary.
protected Dispose ( bool disposing ) : void
disposing bool
return void

FromFile() public static method

Creates an XPdfForm from a file.
public static FromFile ( string path ) : XPdfForm
path string
return XPdfForm

FromStream() public static method

Creates an XPdfForm from a stream.
public static FromStream ( Stream stream ) : XPdfForm
stream Stream
return XPdfForm