PdfSharp-WPF  1.31.7289
PdfSharp.Pdf.PdfPage Class Reference

Represents a page in a PDF document. More...

Inheritance diagram for PdfSharp.Pdf.PdfPage:
PdfSharp.Pdf.PdfDictionary PdfSharp.Pdf.PdfObject PdfSharp.Pdf.PdfItem

Classes

class  InheritablePageKeys
 Predefined keys common to PdfPage and PdfPages. More...
 
struct  InheritedValues
 Values inherited from a parent in the parent chain of a page tree.
 
class  Keys
 Predefined keys of this dictionary. More...
 

Public Member Functions

 PdfPage ()
 Initializes a new page. The page must be added to a document before it can be used. More...
 
 PdfPage (PdfDocument document)
 Initializes a new instance of the PdfPage class. More...
 
void Close ()
 Closes the page. A closes page cannot be modified anymore and it is not possible to get an XGraphics object for a closed page. Closing a page is not required, but may saves resources if the document has many pages. More...
 
PdfLinkAnnotation AddDocumentLink (PdfRectangle rect, int destinationPage)
 Adds an intra document link. More...
 
PdfLinkAnnotation AddWebLink (PdfRectangle rect, string url)
 Adds a link to the Web. More...
 
PdfLinkAnnotation AddFileLink (PdfRectangle rect, string fileName)
 Adds a link to a file. More...
 
- Public Member Functions inherited from PdfSharp.Pdf.PdfDictionary
 PdfDictionary ()
 Initializes a new instance of the PdfDictionary class. More...
 
 PdfDictionary (PdfDocument document)
 Initializes a new instance of the PdfDictionary class. More...
 
new PdfDictionary Clone ()
 Creates a copy of this dictionary. Direct values are deep copied. Indirect references are not modified. More...
 
IEnumerator GetEnumerator ()
 Returns an enumerator that iterates through a collection. More...
 
override string ToString ()
 Returns a string with the content of this object in a readable form. Useful for debugging purposes only. More...
 
PdfStream CreateStream (byte[] value)
 Creates the stream of this dictionary and initializes it with the specified byte array. The function must not be called if the dictionary already has a stream. More...
 
- Public Member Functions inherited from PdfSharp.Pdf.PdfObject
new PdfObject Clone ()
 Creates a copy of this object. The clone does not belong to a document, i.e. its owner and its iref are null. More...
 
- Public Member Functions inherited from PdfSharp.Pdf.PdfItem
PdfItem Clone ()
 Creates a copy of this object. More...
 

Properties

object Tag [get, set]
 Gets or sets a user defined object that contains arbitrary information associated with this PDF page. The tag is not used by PDFsharp. More...
 
PageOrientation Orientation [get, set]
 Gets or sets the orientation of the page. The default value PageOrientation.Portrait. If an imported page has a /Rotate value that matches the formula 90 + n * 180 the orientation is set to PageOrientation.Landscape. More...
 
PageSize Size [get, set]
 Gets or sets one of the predefined standard sizes like. More...
 
TrimMargins TrimMargins [get, set]
 Gets or sets the trim margins. More...
 
PdfRectangle MediaBox [get, set]
 Gets or sets the media box directly. XGrahics is not prepared to work with a media box with an origin other than (0,0). More...
 
PdfRectangle CropBox [get, set]
 Gets or sets the crop box. More...
 
PdfRectangle BleedBox [get, set]
 Gets or sets the bleed box. More...
 
PdfRectangle ArtBox [get, set]
 Gets or sets the art box. More...
 
PdfRectangle TrimBox [get, set]
 Gets or sets the trim box. More...
 
XUnitHeight [get, set]
 Gets or sets the height of the page. If orientation is Landscape, this function applies to the width. More...
 
XUnitWidth [get, set]
 Gets or sets the width of the page. If orientation is Landscape, this function applies to the height. More...
 
int Rotate [get, set]
 Gets or sets the /Rotate entry of the PDF page. The value is the number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. PDFsharp does not set this value, but for imported pages this value can be set and must be taken into account when adding graphic to such a page. More...
 
PdfContents Contents [get]
 Gets the array of content streams of the page. More...
 
PdfAnnotations Annotations [get]
 Gets the annotations array of this page. More...
 
PdfCustomValues CustomValues [get, set]
 Gets or sets the custom values. More...
 
- Properties inherited from PdfSharp.Pdf.PdfDictionary
DictionaryElements Elements [get]
 Gets the hashtable containing the elements of this dictionary. More...
 
PdfStream Stream [get, set]
 Gets or sets the PDF stream belonging to this dictionary. Returns null if the dictionary has no stream. To create the stream, call the CreateStream function. More...
 
- Properties inherited from PdfSharp.Pdf.PdfObject
virtual PdfDocument Owner [get]
 Gets the PdfDocument this object belongs to. More...
 
bool IsIndirect [get]
 Indicates whether the object is an indirect object. More...
 
PdfObjectInternals Internals [get]
 Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument. More...
 
PdfReference Reference [get, set]
 Gets the indirect reference of this object. If the value is null, this object is a direct object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PdfSharp.Pdf.PdfDictionary
 PdfDictionary (PdfDictionary dict)
 Initializes a new instance from an existing dictionary. Used for object type transformation. More...
 
override object Copy ()
 This function is useful for importing objects from external documents. The returned object is not yet complete. irefs refer to external objects and directed objects are cloned but their document property is null. A cloned dictionary or array needs a 'fix-up' to be a valid object. More...
 
- Protected Member Functions inherited from PdfSharp.Pdf.PdfObject
 PdfObject ()
 Initializes a new instance of the PdfObject class. More...
 
 PdfObject (PdfDocument document)
 Initializes a new instance of the PdfObject class. More...
 
 PdfObject (PdfObject obj)
 Initializes a new instance from an existing object. Used for object type transformation. More...
 
override object Copy ()
 Implements the copy mechanism. Must be overridden in derived classes. More...
 
- Protected Attributes inherited from PdfSharp.Pdf.PdfDictionary
DictionaryElements elements
 The elements of the dictionary. More...
 

Detailed Description

Represents a page in a PDF document.

Constructor & Destructor Documentation

◆ PdfPage() [1/2]

PdfSharp.Pdf.PdfPage.PdfPage ( )

Initializes a new page. The page must be added to a document before it can be used.

◆ PdfPage() [2/2]

PdfSharp.Pdf.PdfPage.PdfPage ( PdfDocument  document)

Initializes a new instance of the PdfPage class.

Parameters
documentThe document.

Member Function Documentation

◆ AddDocumentLink()

PdfLinkAnnotation PdfSharp.Pdf.PdfPage.AddDocumentLink ( PdfRectangle  rect,
int  destinationPage 
)

Adds an intra document link.

Parameters
rectThe rect.
destinationPageThe destination page.

◆ AddFileLink()

PdfLinkAnnotation PdfSharp.Pdf.PdfPage.AddFileLink ( PdfRectangle  rect,
string  fileName 
)

Adds a link to a file.

Parameters
rectThe rect.
fileNameName of the file.

◆ AddWebLink()

PdfLinkAnnotation PdfSharp.Pdf.PdfPage.AddWebLink ( PdfRectangle  rect,
string  url 
)

Adds a link to the Web.

Parameters
rectThe rect.
urlThe URL.

◆ Close()

void PdfSharp.Pdf.PdfPage.Close ( )

Closes the page. A closes page cannot be modified anymore and it is not possible to get an XGraphics object for a closed page. Closing a page is not required, but may saves resources if the document has many pages.

Property Documentation

◆ Annotations

PdfAnnotations PdfSharp.Pdf.PdfPage.Annotations
get

Gets the annotations array of this page.

◆ ArtBox

PdfRectangle PdfSharp.Pdf.PdfPage.ArtBox
getset

Gets or sets the art box.

◆ BleedBox

PdfRectangle PdfSharp.Pdf.PdfPage.BleedBox
getset

Gets or sets the bleed box.

◆ Contents

PdfContents PdfSharp.Pdf.PdfPage.Contents
get

Gets the array of content streams of the page.

◆ CropBox

PdfRectangle PdfSharp.Pdf.PdfPage.CropBox
getset

Gets or sets the crop box.

◆ CustomValues

PdfCustomValues PdfSharp.Pdf.PdfPage.CustomValues
getset

Gets or sets the custom values.

◆ Height

XUnit? PdfSharp.Pdf.PdfPage.Height
getset

Gets or sets the height of the page. If orientation is Landscape, this function applies to the width.

◆ MediaBox

PdfRectangle PdfSharp.Pdf.PdfPage.MediaBox
getset

Gets or sets the media box directly. XGrahics is not prepared to work with a media box with an origin other than (0,0).

◆ Orientation

PageOrientation PdfSharp.Pdf.PdfPage.Orientation
getset

Gets or sets the orientation of the page. The default value PageOrientation.Portrait. If an imported page has a /Rotate value that matches the formula 90 + n * 180 the orientation is set to PageOrientation.Landscape.

◆ Rotate

int PdfSharp.Pdf.PdfPage.Rotate
getset

Gets or sets the /Rotate entry of the PDF page. The value is the number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. PDFsharp does not set this value, but for imported pages this value can be set and must be taken into account when adding graphic to such a page.

◆ Size

PageSize PdfSharp.Pdf.PdfPage.Size
getset

Gets or sets one of the predefined standard sizes like.

◆ Tag

object PdfSharp.Pdf.PdfPage.Tag
getset

Gets or sets a user defined object that contains arbitrary information associated with this PDF page. The tag is not used by PDFsharp.

◆ TrimBox

PdfRectangle PdfSharp.Pdf.PdfPage.TrimBox
getset

Gets or sets the trim box.

◆ TrimMargins

TrimMargins PdfSharp.Pdf.PdfPage.TrimMargins
getset

Gets or sets the trim margins.

◆ Width

XUnit? PdfSharp.Pdf.PdfPage.Width
getset

Gets or sets the width of the page. If orientation is Landscape, this function applies to the height.


The documentation for this class was generated from the following file: