GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    DocumentSettings Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents stored preferences which shall be used when processing the contents of the document.

    • C#
    • VB.NET
    public sealed class DocumentSettings
    Public NotInheritable Class DocumentSettings
    Inheritance:
    System.Object
    DocumentSettings

    Constructors

    DocumentSettings()

    Initializes a new instance of the DocumentSettings class.

    • C#
    • VB.NET
    public DocumentSettings()
    Public Sub New

    Properties

    AttachedTemplate

    Gets or sets the location of a document template which shall be attached to the current document if it is accessible and of a format supported by an application such as MS Word.

    • C#
    • VB.NET
    public string AttachedTemplate { get; set; }
    Public Property AttachedTemplate As String
    Property Value
    System.String

    The location of a document template which shall be attached to the current document.

    Remarks

    If value is null or System.String.Empty, then the document shall not have an attached document template, and applications should use their default template in its place.

    BookFoldPrinting

    Gets or sets a value indicating whether to print the document as a book fold. Supported only in DOCX format.

    • C#
    • VB.NET
    public bool BookFoldPrinting { get; set; }
    Public Property BookFoldPrinting As Boolean
    Property Value
    System.Boolean

    true to print a document in a series of booklets so the printed pages can be folded and read as a book; otherwise, false.

    BookFoldPrintingReverse

    Gets or sets a value indicating whether to print the document as a reverse book fold. Supported only in DOCX format.

    • C#
    • VB.NET
    public bool BookFoldPrintingReverse { get; set; }
    Public Property BookFoldPrintingReverse As Boolean
    Property Value
    System.Boolean

    true to reverse the printing order for book fold printing of bidirectional or Asian language documents; otherwise, false.

    BookFoldPrintingSheets

    Gets or sets the number of pages to be included in each booklet.

    • C#
    • VB.NET
    public int BookFoldPrintingSheets { get; set; }
    Public Property BookFoldPrintingSheets As Integer
    Property Value
    System.Int32

    The number of pages for each booklet.

    CompatibilityMode

    Gets or sets the Microsoft Word compatibility mode. For Microsoft Word 2016, set this value to 15.

    • C#
    • VB.NET
    public int CompatibilityMode { get; set; }
    Public Property CompatibilityMode As Integer
    Property Value
    System.Int32

    The Microsoft Word compatibility mode.

    DecimalSeparator

    Gets or sets the string to use as the decimal separator in numeric values in the document.

    • C#
    • VB.NET
    public string DecimalSeparator { get; set; }
    Public Property DecimalSeparator As String
    Property Value
    System.String

    The string to use as the decimal separator in numeric values in the document.

    DefaultTabStop

    Gets or sets the value which shall be used as the multiplier to generate automatic tab stops in this document.

    Default value is 36 points (half an inch).

    • C#
    • VB.NET
    public double DefaultTabStop { get; set; }
    Public Property DefaultTabStop As Double
    Property Value
    System.Double

    The value which shall be used as the multiplier to generate automatic tab stops in this document.

    Remarks

    Automatic tab stops refer to the tab stop locations which occur after all custom tab stops in the current paragraph have been surpassed.

    DoNotExpandShiftReturn

    Gets or sets a value indicating whether to justify the contents of incomplete lines which end in a soft line break when the parent paragraph is justified.

    • C#
    • VB.NET
    public bool DoNotExpandShiftReturn { get; set; }
    Public Property DoNotExpandShiftReturn As Boolean
    Property Value
    System.Boolean

    true to not expand character spaces on the line ending in justified paragraph; otherwise, false.

    Endnote

    Gets the endnote settings.

    • C#
    • VB.NET
    public NoteSettings Endnote { get; }
    Public ReadOnly Property Endnote As NoteSettings
    Property Value
    NoteSettings

    The endnote settings.

    Remarks

    Note can be configured using NoteSettings on a document level (Footnote and Endnote) or on a section level (FootnoteSettings and EndnoteSettings. Document level settings are cloned when new Section is added to the DocumentModel.

    PDF format has the following limitations:

    • Footnotes are always rendered on the same page as their references.
    • Footnotes that don't fit on a single page are clipped.
    • Note numbering setting RestartEachPage is not supported.

    HTML and TXT formats have the following limitations:

    • All footnotes and then endnotes are exported at the end of the document.
    • Note numbering setting RestartEachPage is not supported.

    Footnote

    Gets the footnote settings.

    • C#
    • VB.NET
    public NoteSettings Footnote { get; }
    Public ReadOnly Property Footnote As NoteSettings
    Property Value
    NoteSettings

    The footnote settings.

    Remarks

    Note can be configured using NoteSettings on a document level (Footnote and Endnote) or on a section level (FootnoteSettings and EndnoteSettings. Document level settings are cloned when new Section is added to the DocumentModel.

    PDF format has the following limitations:

    • Footnotes are always rendered on the same page as their references.
    • Footnotes that don't fit on a single page are clipped.
    • Note numbering setting RestartEachPage is not supported.

    HTML and TXT formats have the following limitations:

    • All footnotes and then endnotes are exported at the end of the document.
    • Note numbering setting RestartEachPage is not supported.

    MirrorPageMargins

    Gets or sets a value indicating whether the left and right margins defined in the PageSetup shall be swapped on facing pages.

    • C#
    • VB.NET
    public bool MirrorPageMargins { get; set; }
    Public Property MirrorPageMargins As Boolean
    Property Value
    System.Boolean

    true if the left and right margins defined in the PageSetup shall be swapped on facing pages; otherwise, false.

    Remarks

    This setting is generally used when printing on both sides of pages and binding them like a book.

    TrackRevisions

    Gets or sets a value indicating whether changes are tracked as revisions.

    • C#
    • VB.NET
    public bool TrackRevisions { get; set; }
    Public Property TrackRevisions As Boolean
    Property Value
    System.Boolean

    true if changes are tracked when this document is edited in Microsoft Word; otherwise, false.

    Remarks

    GemBox.Document does not use this option when updating the document, it does not automatically track changes. This option only instructs Microsoft Word whether the track changes are enabled or disabled.

    TwoPagesOnOne

    Gets or sets a value indicating whether to print two pages per sheet. Supported only in DOCX format.

    • C#
    • VB.NET
    public bool TwoPagesOnOne { get; set; }
    Public Property TwoPagesOnOne As Boolean
    Property Value
    System.Boolean

    true to print a document two pages per sheet; otherwise, false.

    UpdateStylesOnOpen

    Gets or sets a value indicating whether the styles in the specified document are updated to match the styles in the attached template each time the document is opened by an application such as MS Word.

    • C#
    • VB.NET
    public bool UpdateStylesOnOpen { get; set; }
    Public Property UpdateStylesOnOpen As Boolean
    Property Value
    System.Boolean

    true if the styles in the specified document are updated to match the styles in the attached template each time the document is opened; otherwise, false.

    Remarks

    GemBox.Document does not use this flag to update styles when document is loaded.

    Methods

    Clone()

    Clones this DocumentSettings instance.

    • C#
    • VB.NET
    public DocumentSettings Clone()
    Public Function Clone As DocumentSettings
    Returns
    DocumentSettings

    Cloned DocumentSettings.

    Clone(DocumentModel)

    Clones this DocumentSettings instance.

    • C#
    • VB.NET
    public DocumentSettings Clone(DocumentModel destinationDocument)
    Public Function Clone(destinationDocument As DocumentModel) As DocumentSettings
    Parameters
    destinationDocument
    DocumentModel

    Destination document which will store styles etc. from cloned elements.

    Returns
    DocumentSettings

    Cloned DocumentSettings.

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.