Table of Contents

Constructor PdfDocument

Namespace
BitMiracle.Docotic.Pdf
Assembly
BitMiracle.Docotic.Pdf.dll

PdfDocument()

Creates a new blank PDF document.

public PdfDocument()

Remarks

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(PdfConfigurationOptions)

Creates a new blank PDF document using specified configuration options.

public PdfDocument(PdfConfigurationOptions options)

Parameters

options PdfConfigurationOptions

The configuration options.

Remarks

Read the Font loading in cloud environments section for an example of using configuration options.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(string)

Opens an existing PDF document.

public PdfDocument(string fileName)

Parameters

fileName string

The name of the existing PDF file.

Remarks

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(byte[])

Opens an existing PDF document.

public PdfDocument(byte[] buffer)

Parameters

buffer byte[]

The byte buffer from which the PDF document to be read.

Remarks

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(Stream)

Opens an existing PDF document.

public PdfDocument(Stream stream)

Parameters

stream Stream

The stream from which the PDF document to be read.

Remarks

The stream must be a stream that supports reading and seeking. Otherwise, the constructor throws an exception of PdfException type.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(string, PdfConfigurationOptions)

Opens an existing PDF document using specified configuration options.

public PdfDocument(string fileName, PdfConfigurationOptions options)

Parameters

fileName string

The name of the existing PDF file.

options PdfConfigurationOptions

The configuration options.

Remarks

Read the Font loading in cloud environments section for an example of using configuration options.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(Stream, PdfConfigurationOptions)

Opens an existing PDF document using specified configuration options.

public PdfDocument(Stream stream, PdfConfigurationOptions options)

Parameters

stream Stream

The stream from which the PDF document to be read.

options PdfConfigurationOptions

The configuration options.

Remarks

The stream must be a stream that supports reading and seeking. Otherwise, the constructor throws an exception of PdfException type.

Read the Font loading in cloud environments section for an example of using configuration options.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(string, PdfDecryptionHandler)

Opens an existing encrypted PDF document.

public PdfDocument(string fileName, PdfDecryptionHandler handler)

Parameters

fileName string

The name of the existing PDF file.

handler PdfDecryptionHandler

The decryption handler to use to decrypt the file.

Remarks

Check the Decrypt PDF documents in C# and VB.NET article for more information on processing encrypted PDF documents.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(Stream, PdfDecryptionHandler)

Opens an existing encrypted PDF document.

public PdfDocument(Stream stream, PdfDecryptionHandler handler)

Parameters

stream Stream

The stream from which the PDF document to be read.

handler PdfDecryptionHandler

The decryption handler to use to decrypt the file.

Remarks

Check the Decrypt PDF documents in C# and VB.NET article for more information on processing encrypted PDF documents.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(string, PdfDecryptionHandler, PdfConfigurationOptions)

Opens an existing encrypted PDF document using specified configuration options.

public PdfDocument(string fileName, PdfDecryptionHandler handler, PdfConfigurationOptions options)

Parameters

fileName string

The name of the existing PDF file.

handler PdfDecryptionHandler

The decryption handler to use to decrypt the file.

options PdfConfigurationOptions

The configuration options.

Remarks

Check the Decrypt PDF documents in C# and VB.NET article for more information on processing encrypted PDF documents.

Read the Font loading in cloud environments section for an example of using configuration options.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.

PdfDocument(Stream, PdfDecryptionHandler, PdfConfigurationOptions)

Opens an existing encrypted PDF document using specified configuration options.

public PdfDocument(Stream stream, PdfDecryptionHandler handler, PdfConfigurationOptions options)

Parameters

stream Stream

The stream from which the PDF document to be read.

handler PdfDecryptionHandler

The decryption handler to use to decrypt the file.

options PdfConfigurationOptions

The configuration options.

Remarks

The stream must be a stream that supports reading and seeking. Otherwise, the constructor throws an exception of PdfException type.

Check the Decrypt PDF documents in C# and VB.NET article for more information on processing encrypted PDF documents.

Read the Font loading in cloud environments section for an example of using configuration options.

It is required to apply your license key(s) before using this constructor. Call one of the AddLicenseData methods to apply the keys. Without a valid license key, this constructor throws an exception of InvalidOperationException type.

To test the library, get a free time-limited license key using the form on the Download C# .NET PDF library page.