Click or drag to resize

ImportMapping Class

Represents a mapping of styles (and other referenced objects) from source document to destination document when importing elements between two different DocumentModel instances.
Inheritance Hierarchy
SystemObject
  GemBox.DocumentImportMapping

Namespace:  GemBox.Document
Assembly:  GemBox.Document (in GemBox.Document.dll) Version: 27.3.30.1087
Syntax
public sealed class ImportMapping

The ImportMapping type exposes the following members.

Constructors
  NameDescription
Public methodImportMapping
Initializes a new instance of the ImportMapping class.
Top
Properties
  NameDescription
Public propertyDestinationDocument
Gets the destination document.
Public propertySourceDocument
Gets the source document.
Public propertyUseDestinationStyles
Gets a value indicating whether to use destination document styles if they have the same name as source document styles, even though they do not have the same formatting.
Top
Methods
  NameDescription
Public methodGetDestinationStyle
Gets the destination Style that matches the specified source style.
Public methodSetDestinationStyle
Sets the destination Style that matches the specified source style.
Top
Remarks
Same ImportMapping instance can be used for multiple imports. This improves performances because matching styles (mapping from source document style to destination document style) do not have to be identified in subsequent imports if they where matched in previous imports. It also reduces memory usage and provides more consistent behavior in some particular scenarios which involve importing list paragraphs, list styles and paragraph styles which contain list formatting.
See Also