New to Telerik Document Processing? Start a free 30-day trial

Settings for importing PDF documents, controlling reading mode, stream copying, and event hooks used during the import process.

Definition

Namespace:Telerik.Documents.Fixed.FormatProviders.Pdf.Import

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

C#
[TypeConverter(typeof(PdfImportSettingsTypeConverter))]
public class PdfImportSettings

Inheritance: objectPdfImportSettings

Constructors

Creates import settings with ReadingMode set to AllAtOnce and CopyStream set to false.

C#
public PdfImportSettings()

Properties

Controls whether the document stream is copied during import. When false and ReadingMode is OnDemand, the original stream must be kept open while the document is in use. When true, the original stream can be disposed after import, regardless of the reading mode.

C#
public bool CopyStream { get; set; }

Gets or sets whether marked content containers are flattened and the document structure tree is skipped.

C#
public bool IgnoreMarkedContent { get; set; }
Property Value:

true to ignore marked content containers and skip importing the structure tree; otherwise, false.

Default settings for loading all page content on import:

csharp
{ ReadingMode = AllAtOnce, CopyStream = false }
C#
public static PdfImportSettings ReadAllAtOnce { get; }

Controls how page content is loaded during import. If AllAtOnce applied, the document pages content will be loaded on import. If OnDemand applied, the document pages content will be loaded on demand.

Currently, the OnDemand setting should be applied for use with viewers only.

C#
public ReadingMode ReadingMode { get; set; }

Default settings for deferred, on-demand page loading:

csharp
{ ReadingMode = OnDemand, CopyStream = true }
C#
public static PdfImportSettings ReadOnDemand { get; }

Events

Raised when an unhandled exception occurs during document import; provides error details for logging or recovery.

C#
public event EventHandler<DocumentUnhandledExceptionEventArgs> DocumentUnhandledException

Raised when embedded files share the same name; provides a way to resolve to a unique file name.

C#
public event EventHandler<DuplicatedEmbeddedFileNameResolvingEventArgs> DuplicatedEmbeddedFileNameResolving

Raised when an owner password is required to access restricted operations; provides the password to continue import.

C#
public event EventHandler<PasswordNeededEventArgs> OwnerPasswordNeeded

Raised when a user password is required to open the document; provides the password to continue import.

C#
public event EventHandler<PasswordNeededEventArgs> UserPasswordNeeded