Winnovative Logo

Document Class

Winnovative Client for .NET Core
This class encapsulates a PDF document and can be used to create a new PDF document or to load an existing PDF document
Inheritance Hierarchy

SystemObject
  WinnovativeClientDocument

Namespace:  WinnovativeClient
Assembly:  WinnovativeClient_NetCore (in WinnovativeClient_NetCore.dll) Version: 17.0.0
Syntax

public class Document

The Document type exposes the following members.

Constructors

  NameDescription
Public methodDocument
Creates an empty PDF document object. New pages can be added to the document and new PDF elements can be added to document pages.
Public methodDocument(Byte)
Creates a PDF document object from the specified PDF document data.
Public methodDocument(ColorProfile)
Creates a PDF document with a color profile.
Public methodDocument(ColorSpace)
Creates a PDF document with the specified color space. This property can be used to create PDF documents in RGB, Grayscale or CMYK color spaces. By default the document uses the RGB color space.
Public methodDocument(PdfStandardSubset)
Creates a PDF document based on the specified PDF standard. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents.
Public methodDocument(String)
Creates a PDF document from and existing PDF file.
Public methodDocument(UInt32)
Creates an empty PDF document object. New pages can be added to the document and new PDF elements can be added to document pages.
Public methodDocument(Boolean, String)
Creates an empty PDF document object using a web service from a given URL. New pages can be added to the document and new PDF elements can be added to document pages.
Public methodDocument(Byte, String)
Creates a PDF document from binary data containing a password protected PDF document. The specified password can be a user or owner password.
Public methodDocument(PdfStandardSubset, ColorSpace)
Creates a PDF document based on the specified PDF standard and using the specified color space. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(String, Byte)
Creates a PDF document object from the specified PDF document data.
Public methodDocument(String, String)
Creates a PDF document object from an existing password protected PDF file.
Public methodDocument(String, UInt32)
Creates an empty PDF document object. New pages can be added to the document and new PDF elements can be added to document pages.
Public methodDocument(String, ColorProfile)
Creates a PDF document with a color profile.
Public methodDocument(String, ColorSpace)
Creates a PDF document with the specified color space. This property can be used to create PDF documents in RGB, Grayscale or CMYK color spaces. By default the document uses the RGB color space.
Public methodDocument(String, PdfStandardSubset)
Creates a PDF document based on the specified PDF standard. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents.
Public methodDocument(UInt32, Byte)
Creates a PDF document object from the specified PDF document data.
Public methodDocument(UInt32, String)
Creates a PDF document from and existing PDF file.
Public methodDocument(UInt32, ColorProfile)
Creates a PDF document with a color profile.
Public methodDocument(UInt32, ColorSpace)
Creates a PDF document with the specified color space. This property can be used to create PDF documents in RGB, Grayscale or CMYK color spaces. By default the document uses the RGB color space.
Public methodDocument(UInt32, PdfStandardSubset)
Creates a PDF document based on the specified PDF standard. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents.
Public methodDocument(Boolean, String, Byte)
Creates a PDF document object from the specified PDF document data using a web service from a given URL.
Public methodDocument(Boolean, String, String)
Creates a PDF document from and existing PDF file using a web service from a given URL.
Public methodDocument(Boolean, String, ColorProfile)
Creates a PDF document with a color profile using a web service from a given URL.
Public methodDocument(Boolean, String, ColorSpace)
Creates a PDF document with the specified color space using a web service from a given URL. This property can be used to create PDF documents in RGB, Grayscale or CMYK color spaces. By default the document uses the RGB color space.
Public methodDocument(Boolean, String, PdfStandardSubset)
Creates a PDF document based on the specified PDF standard using a web service from a given URL. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents.
Public methodDocument(String, Byte, String)
Creates a PDF document from binary data containing a password protected PDF document. The specified password can be a user or owner password.
Public methodDocument(String, String, String)
Creates a PDF document object from an existing password protected PDF file.
Public methodDocument(String, UInt32, Byte)
Creates a PDF document object from the specified PDF document data.
Public methodDocument(String, UInt32, String)
Creates a PDF document from and existing PDF file.
Public methodDocument(String, UInt32, ColorProfile)
Creates a PDF document with a color profile.
Public methodDocument(String, UInt32, ColorSpace)
Creates a PDF document with the specified color space. This property can be used to create PDF documents in RGB, Grayscale or CMYK color spaces. By default the document uses the RGB color space.
Public methodDocument(String, UInt32, PdfStandardSubset)
Creates a PDF document based on the specified PDF standard. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents.
Public methodDocument(String, PdfStandardSubset, ColorSpace)
Creates a PDF document based on the specified PDF standard and using the specified color space. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(UInt32, Byte, String)
Creates a PDF document from binary data containing a password protected PDF document. The specified password can be a user or owner password.
Public methodDocument(UInt32, String, String)
Creates a PDF document object from an existing password protected PDF file.
Public methodDocument(UInt32, PdfStandardSubset, ColorSpace)
Creates a PDF document based on the specified PDF standard and using the specified color space. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(Boolean, String, Byte, String)
Creates a PDF document from binary data containing a password protected PDF document using a web service from a given URL. The specified password can be a user or owner password.
Public methodDocument(Boolean, String, String, String)
Creates a PDF document object from an existing password protected PDF file using a web service from a given URL.
Public methodDocument(Boolean, String, PdfStandardSubset, ColorSpace)
Creates a PDF document based on the specified PDF standard and using the specified color space using a web service from a given URL. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(String, UInt32, Byte, String)
Creates a PDF document from binary data containing a password protected PDF document. The specified password can be a user or owner password.
Public methodDocument(String, UInt32, String, String)
Creates a PDF document object from an existing password protected PDF file.
Public methodDocument(String, UInt32, PdfStandardSubset, ColorSpace)
Creates a PDF document based on the specified PDF standard and using the specified color space. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(Boolean, String, String, Byte, String)
Creates a PDF document from binary data containing a password protected PDF document using a web service from a given URL. The specified password can be a user or owner password.
Public methodDocument(Boolean, String, String, String, String)
Creates a PDF document object from an existing password protected PDF file using a web service from a give URL.
Public methodDocument(Boolean, String, PdfStandardSubset, ColorSpace, ColorProfile)
Creates a PDF document based on the specified PDF standard and using the specified color space and color profile using a wb service from a given URL. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(String, UInt32, String, Byte, String)
Creates a PDF document from binary data containing a password protected PDF document. The specified password can be a user or owner password.
Public methodDocument(String, UInt32, String, String, String)
Creates a PDF document object from an existing password protected PDF file.
Public methodDocument(String, UInt32, PdfStandardSubset, ColorSpace, ColorProfile)
Creates a PDF document based on the specified PDF standard and using the specified color space and color profile. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(Boolean, String, String, PdfStandardSubset, ColorSpace, ColorProfile)
Creates a PDF document based on the specified PDF standard and using the specified color space and color profile using a web service from a given URL. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Public methodDocument(String, UInt32, String, PdfStandardSubset, ColorSpace, ColorProfile)
Creates a PDF document based on the specified PDF standard and using the specified color space and color profile. By default the Full PDF standard is used. This property can be used to create PDF/A or PDF/X compliant documents using the specified color space.
Top
Properties

  NameDescription
Public propertyClientProxy
You can set this property with an object implementing the IWebProxy interface to be used when accessing the PDF Document Web Service through a proxy server. This property does not have any effect when using a TCP Service
Public propertyCompressCrossReference
Set this property on true to store the PDF cross-reference table and PDF trailer in compressed cross-reference streams and to reduce the PDF file size. The default value is false for the new documents
Public propertyCompressionLevel
Gets or sets the PDF document compression level. By default the compression level is Normal
Public propertyDocumentInformation
Offers access to the document information object where the document's title, subject, keywords, etc can be set.
Public propertyFooter
Represents the default PDF document footer template. This footer is automatically considered when calculating the available space for rendering in a PDF page. This template is automatically docked to the bottom of the PDF page. You can add a document footer with AddFooterTemplate(Single) method.
Public propertyForm
Gets a reference to the PDF form of this PDF document
Public propertyHeader
Represents the default PDF document header template. This header is automatically considered when calculating the available space for drawing in a PDF page. This template is automatically docked to the top of the PDF page. You can add a document footer with AddHeaderTemplate(Single) method.
Public propertyJpegCompressionEnabled
Gets or sets a flag indicating if the JPEG compression is enabled or not for the images in the generated PDF. By default the JPEG compression is enabled to reduce the size of the generated PDF. When the JPEG compression is enabled the quality of the images in the generated PDF is lower than the quality of the original images in the HTML document, function of the JpegCompressionLevel parameter. When the JpegCompressionLevel is increased, the quality of the images in PDF decreases.
Public propertyJpegCompressionLevel
Gets or sets the compression level of images in the generated PDF as an integer value between 0 and 100. This property has effect only when the JpegCompressionEnabled is true. When the JpegCompressionLevel is 0, the compression rate is the lowest and the quality of the images is the best. When the JpegCompressionLevel is 100, the compression rate is the highest and quality of the images in PDF is the worst. The default JPEG compression level is 10, which should offer a good balance between the compression rate and the quality of the images in PDF.
Public propertyLicenseKey
Gets or sets the license key string received from the vendor. If this property is null the library will automatically enter in evaluation mode and a demo watermark will be displayed on the generated PDF document.
Public propertyMargins
The default document margins. The new pages will use the default margins if no margins are specified
Public propertyOpenAction
The Go To, JavaScript, Submit Form or Reset Form action to be performed when the PDF document is opened.
Public propertyPageCount
Gets the current number of PDF pages
Public propertyPages
Gets the current list of PDF pages
Public propertyPort
The server port number
Public propertySecurity
Offers access to security options of the PDF document like encryption.
Public propertyServer
The server IP or name
Public propertyServicePassword
Gets or sets the HTML to PDF converter service password. You have to set this property if the HTML to PDF service is password protected.
Public propertyTableOfContents
Gets a reference to the object controlling the automatic creation of a table of contents in the generated PDF document based on HtmlToPdfElement and HtmlToImageElement objects added to PDF document
Public propertyTransparencyEnabled
Gets or sets a flag indicating if the transparency is enabled in the PDF document. Default value is true. This property can be set to false to eliminate the additional flattening time when the document is sent to the printer from Adobe Reader viewer.
Public propertyUseWebService
A flag indicating if the client library will call the Web service or the TCP service to create the PDF document
Public propertyViewerPreferences
Offers access to the viewer preferences settings for the document.
Public propertyWebServiceUrl
The web service URL
Top
Methods

  NameDescription
Public methodAddBookmark(Bookmark)
Adds a top level bookmark to PDF document
Public methodAddBookmark(Bookmark, Bookmark)
Adds a child bookmark to PDF document having a previously added bookmark as parent
Public methodAddElement(PageElement)
Adds a PDF page element to this document right after the last PDF element added to document or to a page
Public methodAddElement(PageElement, Single)
Adds a PDF page element to this document at the given Y offset after the last PDF element added to document or to a page
Public methodAddElement(PageElement, Single, Single)
Adds a PDF page element to this document at the given X offset and the given Y offset after the last PDF element added to document or to a page
Public methodAddElement(PageElement, Single, Boolean, Single, 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.
Public methodAddElement(PageElement, 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.
Public methodAddFileAttachment(String)
Adds an attachment a given file to this PDF document
Public methodAddFileAttachment(Byte, String)
Adds an attachment with the given name from binary data to this PDF document
Public methodAddFileAttachment(String, String)
Adds an attachment a given file and given description to this PDF document
Public methodAddFileAttachment(Byte, String, String)
Adds an attachment with the given name and a given description from binary data to this PDF document
Public methodAddFooterTemplate
Adds a footer with the given height to document
Public methodAddFormField(PdfFormField)
Adds a form field to this document right after the last PDF element added to document or to a page
Public methodAddFormField(PdfFormField, Single)
Adds a form field to this document at the given Y offset after the last PDF element added to document or to a page
Public methodAddFormField(PdfFormField, Single, Single)
Adds a form field to this document at the given X offset and the given Y offset after the last PDF element added to document or to a page
Public methodAddFormField(PdfFormField, Single, Boolean, Single, 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.
Public methodAddFormField(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.
Public methodAddHeaderTemplate
Adds a header with the given height to document
Public methodAddPage
Creates a new PDF page and adds it to the collection. If there is a previous page in the collection, the orientation and size are inherited from the that page otherwise a first page with the default A4 size and Portrait orientation is created. The page margins are inherited from the default document margins
Public methodAddPage(PdfMargins)
Creates a new PDF page and adds it to the collection. If there is a previous page in the collection, the orientation and size are inherited from the that page otherwise a first page with the default A4 size and Portrait orientation is created
Public methodAddPage(PdfPageSize, PdfMargins)
Creates a new PDF page and adds it to the collection. If there is a previous page in the collection, the page orientation is inherited from the that page otherwise a first page with the specified size and Portrait orientation is created
Public methodAddPage(PdfPageSize, PdfMargins, PdfPageOrientation)
Creates a new PDF page with the specified size, margins and orientation and adds it to the collection
Public methodAddPage(PdfPageSize, PdfMargins, PdfPageOrientation, RotationAngle)
Creates a new PDF page with the specified size, margins and orientation and adds it to the collection
Public methodAddTemplate(Single, Single)
Adds a new template with the specified width and height to the document templates collection. The template location is top left corner of the page.
Public methodAddTemplate(Single, Single, Single, Single)
Adds a new template with the specified bounds to the document templates collection.
Public methodAppendDocument(Byte)
Appends the PDF document given as parameter to the current document
Public methodAppendDocument(String)
Appends the PDF file given as parameter to this document
Public methodAppendDocument(Byte, String)
Appends the password protected PDF document given as parameter to the current document
Public methodAppendDocument(String, String)
Appends the password protected PDF file given as parameter to this document
Public methodAppendDocument(Byte, Boolean, Boolean, Boolean)
Appends the PDF document given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodAppendDocument(String, Boolean, Boolean, Boolean)
Appends the PDF file given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodAppendDocument(Byte, String, Boolean, Boolean, Boolean)
Appends the password protected PDF document given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodAppendDocument(String, String, Boolean, Boolean, Boolean)
Appends the password protected PDF file given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodClose
Releases all the resources allocated by this PDF document
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetPage
Gets the PDF page from the given index or null if the index is out of bounds
Public methodGetType (Inherited from Object.)
Public methodIndexOfPage
Gets the index of a PDF page in pages collection
Public methodInsertDocument(Int32, Byte)
Inserts the PDF document given as parameter in the current document at the given page index
Public methodInsertDocument(Int32, String)
Inserts the PDF file given as parameter in the current document at the given page index
Public methodInsertDocument(Int32, Byte, String)
Inserts the password protected PDF document given as parameter in the current document at the given page index
Public methodInsertDocument(Int32, String, String)
Inserts the password protected PDF file given as parameter in the current document at the given page index
Public methodInsertDocument(Int32, Byte, Boolean, Boolean, Boolean)
Inserts the PDF document given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodInsertDocument(Int32, String, Boolean, Boolean, Boolean)
Inserts the PDF file given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodInsertDocument(Int32, Byte, String, Boolean, Boolean, Boolean)
Inserts the password protected PDF document given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodInsertDocument(Int32, String, String, Boolean, Boolean, Boolean)
Inserts the password protected PDF file given as parameter to the current document and optionally applies the current document header and footer to the appended document pages
Public methodInsertPage(Int32, PdfPageSize, PdfMargins, PdfPageOrientation)
Creates a new PDF page with the specified size, margins and orientation and inserts it into the collection at the specified index.
Public methodInsertPage(Int32, PdfPageSize, PdfMargins, PdfPageOrientation, RotationAngle)
Creates a new PDF page with the specified size, margins and orientation and inserts it into the collection at the specified index.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSave
Saves the PDF document as byte array that can be further saved into a file or sent over HTTP to a browser.
Public methodSave(String)
Saves this PDF document into the file given by the method parameter
Public methodToString (Inherited from Object.)
Top
See Also

Reference