PdfForm class
Namespace: PdfNetStack.Drawing
Assembly: PdfNetStack.dll
Package: PdfNetStack
A reusable drawing (a form XObject, ISO 32000-1, 8.10): drawn once, placed any number of times with DrawForm. Use it for stamps, letterheads and repeated logos, or with FromPage to place a page of any document, scaled and positioned, on another page.
public sealed class PdfFormInheritance
Properties
Section titled “Properties”Document
Section titled “ Document”The document the form belongs to.
public PdfDocument Document { get; }Property Value
Section titled “Property Value”Height
Section titled “ Height”Height in points.
public double Height { get; }Property Value
Section titled “Property Value”Width in points.
public double Width { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Create(PdfDocument, double, double)
Section titled “ Create(PdfDocument, double, double)”An empty form to draw into with CreateGraphics.
public static PdfForm Create(PdfDocument document, double width, double height)Parameters
Section titled “Parameters”document PdfDocument
width double
height double
Returns
Section titled “Returns”CreateGraphics()
Section titled “ CreateGraphics()”A canvas on the form, top left origin, in points. Dispose it to write the drawing.
public PdfGraphics CreateGraphics()Returns
Section titled “Returns”FromPage(PdfDocument, PdfPage)
Section titled “ FromPage(PdfDocument, PdfPage)”A form showing a page’s visible area (its crop box), upright as the page’s rotation shows it. The page may belong to another document; its fonts and images are copied over. Annotations are not part of the page’s content and are not included.
public static PdfForm FromPage(PdfDocument document, PdfPage page)Parameters
Section titled “Parameters”document PdfDocument
page PdfPage
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”The page’s document does not permit copying its content.