Click or drag to resize
Pdftools logo

Document Class

Inheritance Hierarchy
SystemObject
  PdfTools.Toolbox.InternalNativeBase
    PdfTools.Toolbox.InternalNativeObject
      PdfTools.Toolbox.PdfDocument

Namespace: PdfTools.Toolbox.Pdf
Assembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.2.0+708f7116d933787a0712d56133e4c2c9bf21e5e3
Syntax
C#
public class Document : NativeObject, IDisposable

The Document type exposes the following members.

Properties
 NameDescription
Public propertyAllEmbeddedFiles

Plain embedded, associated, and attached files

This read-only list contains the union of all plain embedded files, associated files, and files contained in file attachment annotations. This is the list of files contained in a PDF as presented in a PDF viewer.

This list does not support appending.

Public propertyAssociatedFiles

Document-associated files

This list contains associated files, whose associated object is the document.

If the document is writable, then it is possible to append new file references to the list. Every file reference object can occur at most once in this list.

Appending to this list results in a Conformance error if the document's conformance is neither PDF/A-3 nor can be upgraded to PDF 2.0.

Public propertyConformance

The claimed conformance of the document.

This method only returns the claimed conformance level, the document is not validated.
Public propertyFormFields

The form fields of the document

This list contains all AcroForm form fields that belong to this document. Adding to this list results in an error:
  • IllegalState if the list has already been closed
  • UnsupportedOperation if the document is read-only
  • IllegalArgument
    • if the given form field node is
    • if the given form field node has already been closed
    • if the given form field node does not belong to the same document as the list
    • if the given form field node has already been added to a form field node list
    • if the given form field node's identifier equals an identifier of one of the form field nodes in this list
This list does not support removing elements or setting elements or clearing.
Public propertyIsLinearized

Whether the document is linearized.

Linearization is also known as "Fast Web View" and is a way of optimizing PDFs so they can be streamed into a client application. This helps online documents open almost instantly, without having to wait for a large document to completely download.

Public propertyMetadata

The metadata of the document.

If the document is writable, the metadata object will be writable too and all changes to the metadata object are reflected in the document.
Public propertyOpenDestination The destination that is displayed when the document is opened.
Public propertyOptionalContentGroups

The optional content groups (layers) of the document.

Public propertyOutline The document outline, also known as "Bookmarks".
Public propertyOutputIntent

The output intent of the document.

The output intent specifies a color profile that characterizes the intended output device. It is used to render device colors on devices other than the intended output device.
Public propertyPages

The pages of the document.

If the document is writable, it is possible to append new pages to the end of the list.
Public propertyPermissions The permissions in force for this document. This property is if the document is not encrypted.
Public propertyPlainEmbeddedFiles

Plain embedded files

This list contains plain embedded files, i.e., files that are embedded in this document without having a specific association (AssociatedFiles), and without being contained in any FileAttachment.

If the document is writable, then it is possible to append new file references to the list. Every file reference object can occur at most once in this list.

For PDF/A-3 documents, appending to this list results in a Conformance error.

Public propertySignatureFields

The signature fields of the document

Signature fields are a special kind of form fields, that can contain digital signatures.
Public propertyViewerSettings The settings to use when opening the document in a viewer.
Top
Methods
 NameDescription
Public methodStatic memberCreate

Create a new PDF document.

Documents with created with this method are writable and can be modified.
Public methodStatic memberCreateWithFdf

Create a new PDF document and an associated FDF.

Documents with created with this method are writable and can be modified. When creating a document with this method, all MarkupAnnotations - created or copied - are stored as an FDF file to the fdfStream. In the output PDF (pdfStream), only annotations that are not MarkupAnnotations are stored.
Public methodDispose

Close the object

Release all native resources associated with the object.
Public methodEquals
(Inherited from NativeObject)
Public methodGetHashCode
(Inherited from NativeObject)
Public methodStatic memberOpen

Open a PDF document.

Documents opened with this method are read-only and cannot be modified.
Public methodStatic memberOpenWithFdf

Open a PDF document together with an FDF file.

Documents opened with this method are read-only and cannot be modified.
Top
See Also