RadFixedDocument
Root fixed document aggregating pages, annotations, form fields, actions, bookmarks, structure tree, and metadata, with merge and clone operations.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public class RadFixedDocument : FixedDocumentElementBase, IFixedDocument, IDestinationContainer, IFixedDocumentElement
Inheritance: objectFixedDocumentElementBaseRadFixedDocument
Implements:
Inherited Members
Constructors
Create an empty document with initialized collections and optional automatic tagging.
Events
Occurs when an unhandled exception is thrown while loading the document properties, e.g. page content and annotations. This event applies when the document is imported with the PdfFormatProvider class using the ReadingMode.OnDemand import setting.
public event EventHandler<DocumentUnhandledExceptionEventArgs> DocumentUnhandledException
Raised to resolve duplicate embedded file names during merge.
public event EventHandler<DuplicatedEmbeddedFileNameResolvingEventArgs> MergedEmbeddedFileNameResolving
Raised to resolve duplicate form field names during merge; handler can supply a unique name.
public event EventHandler<MergedFormFieldNameResolvingEventArgs> MergedFieldNameResolving
Raised to resolve duplicate JavaScript action names during merge.
public event EventHandler<DuplicatedJavaScriptNameResolvingEventArgs> MergedJavaScriptNameResolving
Methods
Deep clone the document (pages, form fields, annotations, destinations, files, scripts, bookmarks) into a new instance.
Creates a new RadFixedDocument containing deep copies of the pages in the specified range. Form fields with widgets on included pages, named destinations pointing to included pages, embedded files, JavaScript actions, and bookmarks are also cloned into the new document.
public RadFixedDocument Clone(int startPageIndex, int pageCount)
The zero-based index of the first page to include.
pageCountintThe number of consecutive pages to include.
Returns:A new RadFixedDocument containing the cloned page range.
Exceptions:startPageIndex is negative, pageCount is less than 1,
or the range exceeds the document page count.
Merge pages, form fields, destinations, actions, scripts, files, and bookmarks from another document.
Export a plain text representation of the entire document.
[Obsolete("This method is obsolete. Please use ToSimpleTextDocument(TimeSpan? timeout) instead.")]
public SimpleTextDocument ToSimpleTextDocument()
An instance of SimpleTextDocument representing the plain text version of the document.
Converts the current document to a plain text document.
public SimpleTextDocument ToSimpleTextDocument(int startPage, int endPage, TimeSpan? timeout)
The starting page index (inclusive) from which to extract text.
endPageintThe ending page index (inclusive) up to which to extract text.
timeoutTimeSpan?The timeout after which the operation will be cancelled.
Returns:An instance of SimpleTextDocument representing the plain text version of the document.
Export a plain text representation limited to the specified page range.
[Obsolete("This method is obsolete. Please use ToSimpleTextDocument(int startPage, int endPage, TimeSpan? timeout) instead.")]
public SimpleTextDocument ToSimpleTextDocument(int startPage, int endPage)
An instance of SimpleTextDocument representing the plain text version of the document.
Converts the current document to a plain text document.
public SimpleTextDocument ToSimpleTextDocument(TimeSpan? timeout)
The timeout after which the operation will be cancelled.
Returns:An instance of SimpleTextDocument representing the plain text version of the document.
Properties
Interactive form (AcroForm) container managing form fields and widgets.
public AcroForm AcroForm { get; }
Document-level actions executed on open, close, save, or print events.
public DocumentActionCollection Actions { get; }
Enumerates all annotations across every page (lazy per page load).
public IEnumerable<Annotation> Annotations { get; }
An enumerable collection of all annotations across all document pages.
Indicates whether new content is auto-tagged for accessibility.
public bool AutoTag { get; }
Hierarchical outline (bookmarks) tree for structured navigation.
public BookmarksCollection Bookmarks { get; }
Document metadata (info dictionary) including title, author, creation date, etc.
public RadFixedDocumentInfo DocumentInfo { get; }
The document information object containing metadata properties.
Embedded file attachments collection.
public EmbeddedFilesCollection EmbeddedFiles { get; }
The collection of embedded file attachments.
Indicates presence of optional content groups (layers).
public bool HasLayers { get; }
BCP 47 language tag applied to document content.
public string Language { get; set; }
Named destination targets enabling internal navigation by name.
public NamedDestinationsCollection NamedDestinations { get; }
The collection of named destinations for document navigation.
Initial viewer page display mode (e.g., outline, thumbnails) when opened.
public PageMode PageMode { get; set; }
Ordered page collection forming the document body.
public PageCollection Pages { get; }
The collection containing all pages in the document.
Gets the PDF Portfolio/Collection settings for enhanced presentation of embedded files. Set IsEnabled to true to enable portfolio mode.
public PortfolioCollection Portfolio { get; }
PDF Portfolios (also known as PDF Collections or PDF Packages) allow organizing multiple embedded files within a single PDF with a structured user interface showing file metadata in columns (details view) or icons (tile view). This feature was introduced in PDF 1.7.
Logical structure tree root describing tagged PDF semantics.
public StructureTree StructureTree { get; set; }
Gets the viewer preferences controlling the way the document is to be presented on the screen or in print. If no such dictionary is specified, viewing and printing applications should behave in accordance with their own current user preference settings.
public ViewerPreferences ViewerPreferences { get; }
The viewer preferences.