Click or drag to resize

PdfDocument Methods

The PdfDocument type exposes the following members.

Methods
 NameDescription
Public methodClone

Makes a deep clone of this PdfDocument instance.

The clone and this PdfDocument do not share any objects, thus the cloned PdfDocument is a deep clone of this PdfDocument.

Public methodClose

Closes the PDF file associated with this PdfDocument.

Any PdfDocument that is associated with the PDF file should be closed, otherwise memory and resource leaks might occur because PDF file stream might not be closed until the application exists.

Public methodDispose

Closes the PDF file associated with this PdfDocument.

Any PdfDocument that is associated with the PDF file should be closed, otherwise memory and resource leaks might occur because PDF file stream might not be closed until the application exists.

Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodLoad

Loads the PdfDocument entirely from the PDF file.

PDF file remains open. If you want to close the PDF file, use Close method.

Public methodStatic memberLoad(Stream) Loads a PDF document from the specified stream and with the Default options.
Public methodStatic memberLoad(String) Loads a PDF document from a file with the specified path and with the Default options.
Public methodStatic memberLoad(Stream, PdfLoadOptions) Loads a PDF document from the specified stream and with the specified options.
Public methodStatic memberLoad(String, PdfLoadOptions) Loads a PDF document from a file with the specified path and with the specified options.
Public methodSave

Save all the changes made to the current PDF document to the same location from where the PDF document was loaded or last saved.

This feature is also called incremental update.

Use SaveOptions to specify options used for saving the PdfDocument to a PDF file.

Public methodSave(Stream)

Saves the entire PDF document to the specified stream.

Use SaveOptions to specify options used for saving the PdfDocument to a PDF file.

Public methodSave(String)

Saves the entire PDF document to a file with the specified path.

Use SaveOptions to specify options used for saving the PdfDocument to a PDF file.

Public methodSave(Stream, SaveOptions)

Saves the entire PDF document to the specified stream.

Public methodSave(String, SaveOptions)

Saves the entire PDF document to a file with the specified path.

Public methodSetId Sets the Id to a specified Guid value. Both Creation and Modification will be set to the specified Guid value.
Public methodStatic memberCode exampleSetLicense

Activate your copy after purchasing or use temporary license for delete trial message.
ATTENTION: specify this property first of all before using any other class from SautinSoft.Pdf assembly!

Use it when you got own license. We offer two license types:

Have question? Ask us: [email protected].

Public methodSetPortfolio

Sets a new PdfPortfolio to the Portfolio property thus making the this PdfDocument a PDF Portfolio (a collection of file attachments).

This method also clears EmbeddedFiles collection so that a new PdfPortfolio is empty.

Public methodToString Returns a String that represents this PdfDocument instance.
(Overrides ObjectToString)
Public methodUnload

The method that does exactly the opposite of the Load method.

References to all PdfIndirectObjects whose Values were already parsed from the PDF file associated with this PdfDocument are cleared so they can be parsed again when requested for the first time.

This method also resets all fields of the PdfDocument so they are recreated when requested for the first time.

The PdfDocument is, effectively, reset to the state when it was either last loaded from a PDF file or last saved to a PDF file.

Use this method if you are reading a very large PDF document (with thousands of pages) to free memory necessary for reading additional pages.

Top
Extension Methods
 NameDescription
Public Extension MethodGetArray Gets the PdfArray that serves as a backing storage of the specified PdfObject or if no PdfArray serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetOrAddDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Top
See Also