HiQPdf Documentation

PdfDocument Class

Quickly Create High Quality PDFs
The PDF document class
Inheritance Hierarchy

SystemObject
  HiQPdfPdfDocument

Namespace:  HiQPdf
Assembly:  HiQPdf (in HiQPdf.dll) Version: 12.0.0.0
Syntax

public class PdfDocument

The PdfDocument type exposes the following members.

Constructors

  NameDescription
Public methodPdfDocument
Constructs an empty PDF document
Top
Properties

  NameDescription
Public propertyCloseExternalDocuments
Indicates if the external documents added to this document are closed when this document is closed. This property is false by default
Public propertyCompress
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
Public propertyFonts
The PDF document fonts
Public propertyFooter
The PDF document footer. The CreateFooterCanvas(Single, Single) method can be used to create an object of PdfDocumentFooter type
Public propertyForm
The PDF form of this PDF document
Public propertyHeader
The PDF document header. The CreateHeaderCanvas(Single, Single) method can be used to create an object of PdfDocumentHeader type
Public propertyImagesCompression
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
Public propertyMargins
The PDF document margins
Public propertyOutlines
The collection of top level outlines. The children of a top level outline can be accessed with ChildOutlines property of PdfOutline
Public propertyPages
The PDF document pages
Public propertyProperties
Controls the title, subject, keywords, author and the creation date of the PDF document
Public propertyRenderWithTransparency
Indicates if the resulted PDF can contain transparent objects. This property is true by default
Public propertyRepeatCanvases
The collection of canvases to be repeated on each PDF page
Public propertySecurity
Exposes an object to control the PDF document security
Public propertySerialNumber
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
Public propertyTableOfContents
Controls the automatically generated table of the contents for the converted HTML document
Public propertyViewer
Controls the PDF viewer preferences
Top
Methods

  NameDescription
Public methodAddDigitalSignature
Adds a digital signature to a PDF document in the given region of a PDF page
Public methodAddDocument(PdfDocument)
Adds another document to the end of this document. The added document must remain open until this document is saved. This document header and footer is not automatically applied to the added document. Use the AddDocument(PdfDocument, Boolean, Boolean, Boolean) variant to enable this behavior
Public methodAddDocument(Int32, PdfDocument)
Adds another document in this document starting at the given page index. The added document must remain open until this document is saved. This document header and footer is not automatically applied to the added document. Use the AddDocument(Int32, PdfDocument, Boolean, Boolean, Boolean) variant to enable this behavior
Public methodAddDocument(PdfDocument, Int32, Int32)
Adds a range of pages from a document to the end of this document. The added document must remain open until this document is saved. This document header and footer is not automatically applied to the added document. Use the AddDocument(PdfDocument, Int32, Int32, Boolean, Boolean, Boolean) variant to enable this behavior
Public methodAddDocument(Int32, PdfDocument, Int32, Int32)
Adds a range of pages from another document in this document starting at the given page index. The added document must remain open until this document is saved. This document header and footer is not automatically applied to the added document. Use the AddDocument(Int32, PdfDocument, Int32, Int32, Boolean, Boolean, Boolean) variant to enable this behavior
Public methodAddDocument(PdfDocument, Boolean, Boolean, Boolean)
Adds another document to the end of this document and optionally apply this document header and footer to the added document if the added document was loaded from external file or streams. The interactive features of the PDF documents loaded from external files or streams are disabled in the final document
Public methodAddDocument(Int32, PdfDocument, Boolean, Boolean, Boolean)
Adds another document in this document starting at the given page index and optionally apply this document header and footer to the added document if the added document was loaded from external file or streams. The interactive features of the PDF documents loaded from external files or streams are disabled in the final document
Public methodAddDocument(PdfDocument, Int32, Int32, Boolean, Boolean, Boolean)
Adds a range of pages from another document to the end of this document and optionally apply this document header and footer to the added document if the added document was loaded from external file or streams. The interactive features of the PDF documents loaded from external files or streams are disabled in the final document
Public methodAddDocument(Int32, PdfDocument, Int32, Int32, Boolean, Boolean, Boolean)
Adds another document in this document starting at the given page index and optionally apply this document header and footer to the added document if the added document was loaded from external file or streams. The interactive features of the PDF documents loaded from external files or streams are disabled in the final document
Public methodAddPage
Adds a new page with the default size, orientation and margins to the end of this document
Public methodAddPage(PdfDocumentMargins)
Adds a new page with the default size and orientation and the given margins to the end of this document
Public methodAddPage(PdfPage)
Adds an existing page to the end of the PDF document. When the page is from another document that document must remain open until this document is saved
Public methodAddPage(PdfPageSize, PdfDocumentMargins)
Adds a new page with the default orientation and the given size and margins to end of this document
Public methodAddPage(PdfPageSize, PdfDocumentMargins, PdfPageOrientation)
Adds a new page with the given size, margins and orientation at the end of this document
Public methodAddPageAtIndex(Int32, PdfPage)
Adds an existing page at the given index. The first page index is 0. When the page is from another document that document must remain open until this document is saved
Public methodAddPageAtIndex(Int32, PdfPageSize, PdfDocumentMargins, PdfPageOrientation)
Adds a new page with the given size, margins and orientation at the given index. The first page index is 0
Public methodClose
Call this method to release the document resources
Public methodCreateAttachmentFromFile(String)
Attaches the given file to PDF document
Public methodCreateAttachmentFromFile(String, String)
Attaches the given file to PDF document
Public methodCreateAttachmentFromFile(PdfPage, RectangleF, 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
Public methodCreateAttachmentFromStream(Stream, String)
Creates an attachment in PDF document from the given stream. The stream must remain opened until the document is saved
Public methodCreateAttachmentFromStream(Stream, String, String)
Creates an attachment in PDF document from the given stream. The stream must remain opened until the document is saved
Public methodCreateAttachmentFromStream(PdfPage, RectangleF, PdfAttachIconType, Stream, String)
Creates an attachment in PDF document from the given stream and an icon for attachment in the given rectangle in the given PDF page. The stream must remain opened until the document is saved
Public methodCreateChildOutline
Creates a child outline with the given parent in the outline hierarchy
Public methodStatic memberCreateColorProfilePdf
Creates a PDF document with a given color profile
Public methodStatic memberCreateColorSpacePdf
Creates a PDF document with a given color space
Public methodCreateFileLink
Creates link to a file in the given PDF page and the given bounds
Public methodCreateFont(Font)
Creates a PDF font from the given .NET font. The font will be embedded in the generated PDF document
Public methodCreateFont(String)
Creates a PDF font from the given font file
Public methodCreateFont(Font, Boolean)
Creates a PDF font from the given .NET font and optionally embeds the font in the generated PDF document based on embed parameter value
Public methodCreateFooterCanvas(Single)
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
Public methodCreateFooterCanvas(Single, Single)
Creates a footer canvas that can be assigned to the Footer property of the document
Public methodCreateHeaderCanvas(Single)
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
Public methodCreateHeaderCanvas(Single, Single)
Creates a header canvas that can be assigned to the Header property of the document
Public methodCreatePdfLink
Constructs a link in the given PDF page from the given rectangle to the given destination
Public methodCreateRepeatedCanvas
Creates a canvas to be repeated on each PDF page in the given bounding box
Public methodCreateStandardFont
Creates a PDF font from the given standard Type 1 font and adds it to the collection
Public methodStatic memberCreateStandardPdf
Creates a PDF document with a given PDF standard
Public methodCreateTextNote
Constructs a text note in the given PDF page at the given location and with the given text
Public methodCreateTopOutline
Creates a top level outline in document
Public methodCreateUriLink
Constructs a link in the given PDF page from the given rectangle to the resource given by the the destination URI
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberFromFile(String)
Loads a PDF document from a file and returns the created PDF document
Public methodStatic memberFromFile(String, String)
Loads a password protected PDF document from a file and returns the created PDF document
Public methodStatic memberFromStream(Stream)
Loads a PDF document from a stream and returns the created PDF document
Public methodStatic memberFromStream(Stream, String)
Loads a password protected PDF document from a stream and returns the created PDF document
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReleaseSourceDoc
Call this method to release the source from which the document was loaded before closing the document
Public methodRemovePage(Int32)
Removes the page at the given index from document. The first page index is 0
Public methodRemovePage(PdfPage)
Removes the given page from document
Public methodSetOpenAction
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
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteToFile
Writes this PDF document to the output file given by the parameter
Public methodWriteToMemory
Writes the PDF document in a memory buffer and return the memory buffer
Public methodWriteToStream
Writes the PDF document to the given output stream
Top
Events

  NameDescription
Public eventPdfPageAddedFromAnotherDocEvent
An event raised after a page from another document has been added to this document
Top
See Also

Reference