PdfDocument Class

The PDF document class

Definition

Namespace: HiQPdfClient
Assembly: HiQPdfClient.NetCore (in HiQPdfClient.NetCore.dll) Version: 16.0.0
C#
public class PdfDocument
Inheritance
Object    PdfDocument

Constructors

PdfDocument(String) Constructs an empty PDF document using the default server port
PdfDocument(String, Byte) Constructs a PDF document from data using the default server port
PdfDocument(String, String) Constructs a PDF document from a file using the default server port
PdfDocument(String, UInt32) Constructs an empty PDF document
PdfDocument(String, UInt32, PdfColorProfile) Constructs an empty PDF document with a color profile
PdfDocument(String, UInt32, PdfColorSpace) Constructs an empty PDF document with a color space
PdfDocument(String, UInt32, PdfStandard) Constructs an empty PDF document with a standard
PdfDocument(String, UInt32, Byte) Constructs a PDF document from data
PdfDocument(String, UInt32, String) Constructs a PDF document from a file
PdfDocument(String, UInt32, Byte, String) Constructs a PDF document from data of a password protected PDF document
PdfDocument(String, UInt32, String, String) Constructs a PDF document from a password protected file
PdfDocument(String, UInt32, PdfStandard, PdfColorSpace, PdfColorProfile) Constructs an empty PDF document with a standard, color space and color profile
PdfDocument(String, UInt32, String, Byte, String) Constructs a PDF document from data of a password protected PDF document using a server password
PdfDocument(String, UInt32, String, String, String) Constructs a PDF document from a password protected file using a server password
PdfDocument(String, UInt32, String, PdfStandard, PdfColorSpace, PdfColorProfile) Constructs an empty PDF document with a standard, color space and color profile using a server password

Properties

Compress This property controls the content streams compression in the PDF document. By default the content streams are compressed to reduce the size of the generated PDF document
Footer The PDF document footer
Form The PDF form of this PDF document
Header The PDF document header
ImagesCompression Controls the images compression percentage in the PDF document on a scale from 0 to 100. A 0 compression produces the best quality images which leads to larger PDF documents while a 100 compression produces low quality images and small PDF documents
Margins The PDF document margins
PageCount The number of document pages
Pages The list of document pages
Port The server port number
Properties Controls the title, subject, keywords, author and the creation date of the PDF document
RenderWithTransparency Indicates if the resulted PDF can contain transparent objects. This property is true by default
Security Exposes an object to control the PDF document security
SerialNumber The serial number obtained after product purchase. Must be set before writing the document. If it is not set the library will work in evaluation mode
Server The server IP or name
ServerPassword The password to access the server if the server is password protected
TableOfContents Controls the automatically generated table of the contents for the converted HTML document
Viewer Controls the PDF viewer preferences

Methods

AddChildOutline Adds a child outline with the given parent in the outline hierarchy
AddDigitalSignature Adds a digital signature to a PDF document in the given PDF page
AddDocument(Byte) Adds a PDF from data to the end of this document
AddDocument(String) Adds a PDF file to the end of this document
AddDocument(Byte, String) Adds a password protected PDF from data to the end of this document
AddDocument(Int32, Byte) Inserts a PDF from data starting at a given page index in this document
AddDocument(Int32, String) Inserts a PDF file starting at a given page index in this document
AddDocument(String, String) Adds a password protected PDF file to the end of this document
AddDocument(Int32, Byte, String) Inserts a password protected PDF from data starting at a given page index in this document
AddDocument(Int32, String, String) Inserts a password protected PDF file starting at a given page index in this document
AddDocument(Byte, Boolean, Boolean, Boolean) Adds a PDF from data to the end of this document and optionally applies the header and footer of this document to added PDF
AddDocument(String, Boolean, Boolean, Boolean) Adds a PDF file to the end of this document and optionally applies the header and footer of this document to added PDF
AddDocument(Byte, String, Boolean, Boolean, Boolean) Adds a password protected PDF from data to the end of this document and optionally applies the header and footer of this document to added PDF
AddDocument(Int32, Byte, Boolean, Boolean, Boolean) Inserts a PDF from data starting at a given page index in this document and optionally applies the header and footer of this document to inserted PDF
AddDocument(Int32, String, Boolean, Boolean, Boolean) Inserts a PDF file starting at a given page index in this document and optionally applies the header and footer of this document to inserted PDF
AddDocument(String, String, Boolean, Boolean, Boolean) Adds a password protected PDF file to the end of this document and optionally applies the header and footer of this document to added PDF
AddDocument(Int32, Byte, String, Boolean, Boolean, Boolean) Inserts a password protected PDF from data starting at a given page index in this document and optionally applies the header and footer of this document to inserted PDF
AddDocument(Int32, String, String, Boolean, Boolean, Boolean) Inserts a password protected PDF file starting at a given page index in this document and optionally applies the header and footer of this document to inserted PDF
AddFormField(PdfFormField) Adds a form field after the last PDF object rendered
AddFormField(PdfFormField, Single) Adds a form field at the given vertical offset after the last PDF object rendered
AddFormField(PdfFormField, Single, Single) Adds a form field at the given horizontal and vertical offset after the last PDF object rendered
AddFormField(PdfFormField, Single, Boolean, Single, Boolean) Adds a form field at a given X and Y position in PDF page where the last object was rendered. The position can be absolute in PDF page or relative to last object rendered
AddFormField(PdfFormField, Single, Boolean, Boolean, Single, Boolean, Boolean) Adds a form field to this document at the given X and Y location in the PDF page where the last element rendering ended. The location can be absolute in PDF page or relative as an offset from the position where the last element rendering ended.
AddPage Adds a new page with the default size, orientation and margins to the end of this document
AddPage(PdfMargins) Adds a new page with the default size and orientation and the given margins to the end of this document
AddPage(PdfPageSize, PdfMargins) Adds a new page with the default orientation and the given size and margins to end of this document
AddPage(PdfPageSize, PdfMargins, PdfPageOrientation) Adds a new page with the given size, margins and orientation at the end of this document
AddPage(PdfPageSize, PdfMargins, PdfPageOrientation, PdfPageRotation) Adds a new page with the given size, margins, orientation and rotation at the end of this document
AddPageAtIndex Adds a new page with the given size, margins, orientation and rotation at the given index. The first page index is 0
AddTopOutline Adds a top level outline in document
Close Call this method to release the document resources
CreateAttachmentFromData(Byte, String) Creates an attachment in PDF document from the given data
CreateAttachmentFromData(Byte, String, String) Creates an attachment in PDF document from the given data
CreateAttachmentFromData(PdfPage, RectangleFloat, PdfAttachIconType, Byte, String) Creates an attachment in PDF document from the given data and an icon for attachment in the given rectangle in the given PDF page
CreateAttachmentFromData(PdfPage, RectangleFloat, PdfAttachIconType, Byte, String, String) Creates an attachment in PDF document from the given data and an icon for attachment in the given rectangle in the given PDF page
CreateAttachmentFromFile(String) Attaches the given file to PDF document
CreateAttachmentFromFile(String, String) Attaches the given file to PDF document
CreateAttachmentFromFile(PdfPage, RectangleFloat, PdfAttachIconType, String) Attaches the given file to the PDF document and creates an icon for the attachment in the given rectangle in the given PDF page
CreateChildOutline Creates a child outline with the given parent in the outline hierarchy
CreateColorProfilePdf Creates a PDF document with a given color profile
CreateColorSpacePdf Creates a PDF document with a given color space
CreateFileLink Creates link to a file in the given PDF page and the given bounds
CreateFontFromData Creates a system font from font data with given size
CreateFontFromName Creates a PDF font based on a font family name with given size and embedding option
CreateFooterCanvas Creates a footer canvas and assigns it to Footer property of the document. The width of the footer is given by the first page of the document
CreateHeaderCanvas Creates a header canvas and assigns it to Header property of the document. The width of the header is given by the first page of the document
CreatePdfLink Constructs a link in the given PDF page from the given rectangle to the given destination
CreateRepeatedCanvas Creates a canvas to be repeated on each PDF page in the given bounding box
CreateStandardFont Creates a PDF font from the given standard Type 1 font with given size
CreateStandardPdf Creates a PDF document with a given PDF standard
CreateTextNote Constructs a text note in the given PDF page at the given location and with the given text
CreateTopOutline Creates a top level outline in document
CreateUriLink Constructs a link in the given PDF page from the given rectangle to the resource given by the the destination URI
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
FromData(String, Byte) Loads a PDF document from data and returns the created PDF document using the default server port
FromData(String, UInt32, Byte) Loads a PDF document from data and returns the created PDF document
FromData(String, UInt32, Byte, String) Loads a password protected PDF document from data and returns the created PDF document
FromData(String, UInt32, String, Byte, String) Loads a password protected PDF document from data and returns the created PDF document using a server password
FromFile(String, String) Loads a PDF document from a file and returns the created PDF document using the default server port
FromFile(String, UInt32, String) Loads a PDF document from a file and returns the created PDF document
FromFile(String, UInt32, String, String) Loads a password protected PDF document from a file and returns the created PDF document
FromFile(String, UInt32, String, String, String) Loads a password protected PDF document from a file and returns the created PDF document using a server password
FromStream(String, Stream) Loads a PDF document from a stream and returns the created PDF document using the default server port
FromStream(String, UInt32, Stream) Loads a PDF document from a stream and returns the created PDF document
FromStream(String, UInt32, Stream, String) Loads a password protected PDF document from a stream and returns the created PDF document
FromStream(String, UInt32, String, Stream, String) Loads a password protected PDF document from a stream and returns the created PDF document using a server password
GetHashCode
(Inherited from Object)
GetPage Retrieves the PDF page at the given index
GetType
(Inherited from Object)
IndexOfPage Retrieves the index of a PDF page in pages collection
Layout(PdfObject) Adds a PDF object after the last PDF object rendered
Layout(PdfObject, Single) Adds a PDF object at the given vertical offset after the last PDF object rendered
Layout(PdfObject, Single, Single) Adds a PDF object at the given horizontal and vertical offset after the last PDF object rendered
Layout(PdfObject, Single, Boolean, Single, Boolean) Adds a PDF object at a given X and Y position in PDF page where the last object was rendered. The position can be absolute in PDF page or relative to last object rendered
Layout(PdfObject, Single, Boolean, Boolean, Single, Boolean, Boolean) Adds a PDF page element to this document at the given X and Y location in the PDF page where the last element rendering ended. The location can be absolute in PDF page or relative as an offset from the position where the last element rendering ended.
MemberwiseClone
(Inherited from Object)
SetOpenAction Set an action a PDF viewer will execute when the document is opened. An action can be the submit or reset of the PDF form, the execution of a JavaScript code or the jump to a destination in the PDF document
ToString
(Inherited from Object)
WriteToFile Writes this PDF document to the output file given by the parameter
WriteToMemory Writes the PDF document in a memory buffer and return the memory buffer
WriteToStream Writes the PDF document to the given output stream

See Also