• Api Documentation
Show / Hide Table of Contents
  • pdftron
    • PDFNet
    • PDFNet.CharacterOrdering
    • PDFNet.CMSType
    • PDFNet.ConnectionErrorHandlingMode
    • PDFNet.ConnectionErrorProc
    • PDFNet.ConnectionErrorProcNative
    • PDFNetLoader
  • pdftron.Common
    • ByteRange
    • Iterator<T>
    • Matrix2D
    • PDFNetException
    • PDFNetException.ErrorCodes
    • ProgressMonitor
    • Utility
  • pdftron.Crypto
    • AlgorithmIdentifier
    • AlgorithmParams
    • DigestAlgorithm
    • DigestAlgorithm.Type
    • ObjectIdentifier
    • ObjectIdentifier.Predefined
    • RSASSAPSSParams
    • X501AttributeTypeAndValue
    • X501DistinguishedName
    • X509Certificate
    • X509Extension
  • pdftron.FDF
    • FDFDoc
    • FDFField
    • FDFFieldIterator
    • XFDFExportOptions
  • pdftron.Filters
    • Filter
    • Filter.ReferencePos
    • FilterReader
    • FilterWriter
    • FlateEncode
    • MappedFile
    • MappedFile.OpenMode
    • MemoryFilter
  • pdftron.Layout
    • ContentElement
    • ContentNode
    • ContentNodeIterator
    • FlowDocument
    • List
    • List.NumberFormat
    • ListItem
    • Paragraph
    • Paragraph.TextJustification
    • Table
    • TableCell
    • TableCell.CellAlignmentHorizontal
    • TableCell.CellAlignmentVertical
    • TableRow
    • TextRun
    • TextStyledElement
  • pdftron.PDF
    • Action
    • Action.FormActionFlag
    • Action.Type
    • ActionParameter
    • AdvancedImagingConvertOptions
    • AdvancedImagingModule
    • Annot
    • Annot.AnnotationState
    • Annot.BorderStyle
    • Annot.BorderStyle.Style
    • Annot.Flag
    • Annot.Type
    • BitmapInfo
    • Bookmark
    • CADConvertOptions
    • CADConvertOptions.LayoutSortOrder
    • CADModule
    • CharData
    • CharIterator
    • CMSSignatureOptions
    • ColorPt
    • ColorSpace
    • ColorSpace.Type
    • ContentReplacer
    • ConversionOptions
    • Convert
    • Convert.EPUBOutputOptions
    • Convert.ExcelOutputOptions
    • Convert.ExcelOutputOptions.SearchableImageSetting
    • Convert.FlattenFlag
    • Convert.FlattenThresholdFlag
    • Convert.HTMLOutputOptions
    • Convert.HTMLOutputOptions.ContentReflowSetting
    • Convert.HTMLOutputOptions.SearchableImageSetting
    • Convert.OutputOptionsOCR
    • Convert.OutputOptionsOCR.LanguageChoice
    • Convert.OutputOptionsOCR.PreferredOCREngine
    • Convert.PowerPointOutputOptions
    • Convert.PowerPointOutputOptions.SearchableImageSetting
    • Convert.Printer
    • Convert.Printer.Mode
    • Convert.SVGOutputOptions
    • Convert.TiffOutputOptions
    • Convert.WordOutputOptions
    • Convert.WordOutputOptions.SearchableImageSetting
    • Convert.WordOutputOptions.WordOutputFormat
    • Convert.XODOutputOptions
    • Convert.XODOutputOptions.AnnotationOutputFlag
    • Convert.XPSOutputCommonOptions
    • Convert.XPSOutputOptions
    • DataExtractionModule
    • DataExtractionModule.DataExtractionEngine
    • DataExtractionOptions
    • Date
    • Destination
    • Destination.FitType
    • DiffOptions
    • DigitalSignatureField
    • DigitalSignatureField.DocumentPermissions
    • DigitalSignatureField.FieldPermissions
    • DigitalSignatureField.SubFilterType
    • DigitalSignatureFieldIterator
    • DisallowedChange
    • DisallowedChange.Type
    • DocumentConversion
    • DocumentConversionResult
    • Element
    • Element.Type
    • ElementBuilder
    • ElementReader
    • ElementWriter
    • ElementWriter.WriteMode
    • EmbeddedTimestampVerificationResult
    • Field
    • Field.EventType
    • Field.Flag
    • Field.TextJustification
    • Field.Type
    • FieldIterator
    • FileSpec
    • Flattener
    • Flattener.FlattenMode
    • Flattener.Threshold
    • Font
    • Font.Encoding
    • Font.StandardType1Font
    • Font.Type
    • FontCharCodeIterator
    • Function
    • Function.Type
    • GeometryCollection
    • GeometryCollectionSnappingMode
    • GSChangesIterator
    • GState
    • GState.BlendMode
    • GState.GStateAttribute
    • GState.LineCap
    • GState.LineJoin
    • GState.RenderingIntent
    • GState.TextRenderingMode
    • Highlights
    • HTML2PDF
    • HTML2PDF.Proxy
    • HTML2PDF.Proxy.Type
    • HTML2PDF.TOCSettings
    • HTML2PDF.WebPageSettings
    • HTML2PDF.WebPageSettings.ErrorHandling
    • Image
    • Image.InputFilter
    • Image2RGB
    • Image2RGBA
    • MergeXFDFOptions
    • OCRModule
    • OCROptions
    • OfficeToPDFOptions
    • OfficeToPDFOptions.StructureTagLevel
    • Optimizer
    • Optimizer.ImageSettings
    • Optimizer.ImageSettings.CompressionMode
    • Optimizer.ImageSettings.DownsampleMode
    • Optimizer.MonoImageSettings
    • Optimizer.MonoImageSettings.CompressionMode
    • Optimizer.MonoImageSettings.DownsampleMode
    • Optimizer.OptimizerSettings
    • Optimizer.TextSettings
    • OptionsBase
    • Page
    • Page.Box
    • Page.Rotate
    • PageIterator
    • PageLabel
    • PageLabel.Style
    • PageSet
    • PageSet.Filter
    • PathData
    • PathData.PathSegmentType
    • PatternColor
    • PatternColor.TilingType
    • PatternColor.Type
    • PDF2HtmlReflowParagraphsModule
    • PDF2WordModule
    • PDFDoc
    • PDFDoc.ExtractFlag
    • PDFDoc.FlattenAnnotationFlag
    • PDFDoc.InsertFlag
    • PDFDoc.SignaturesVerificationStatus
    • PDFDocGenerator
    • PDFDocInfo
    • PDFDocViewPrefs
    • PDFDocViewPrefs.PageLayout
    • PDFDocViewPrefs.PageMode
    • PDFDocViewPrefs.ViewerPref
    • PDFDraw
    • PDFDraw.PixelFormat
    • PDFNetInternalTools
    • PDFNetInternalToolsLogBackend
    • PDFNetInternalToolsLogLevel
    • PDFRasterizer
    • PDFRasterizer.ColorPostProcessMode
    • PDFRasterizer.OverprintPreviewMode
    • PDFRasterizer.Type
    • Point
    • Print
    • PrinterMode
    • PrinterMode.DuplexMode
    • PrinterMode.NUp
    • PrinterMode.NUpPageOrder
    • PrinterMode.Orientation
    • PrinterMode.OutputColor
    • PrinterMode.OutputQuality
    • PrinterMode.PaperSize
    • PrinterMode.PrintContentTypes
    • PrinterMode.ScaleType
    • PrintToPdfModule
    • PrintToPdfOptions
    • QuadPoint
    • Rect
    • RectCollection
    • Redactor
    • Redactor.Appearance
    • Redactor.Redaction
    • Reflow
    • RefreshOptions
    • Shading
    • Shading.Type
    • ShapedText
    • ShapedText.FailureReason
    • ShapedText.ShapingStatus
    • Stamper
    • Stamper.HorizontalAlignment
    • Stamper.SizeType
    • Stamper.TextAlignment
    • Stamper.VerticalAlignment
    • StructuredOutputModule
    • SVGConvertOptions
    • TemplateDocument
    • TemplateDocumentResult
    • TextDiffOptions
    • TextExtractor
    • TextExtractor.CharRange
    • TextExtractor.Line
    • TextExtractor.ProcessingFlags
    • TextExtractor.Style
    • TextExtractor.Word
    • TextExtractor.XMLOutputFlags
    • TextRange
    • TextSearch
    • TextSearch.ResultCode
    • TextSearch.SearchMode
    • TimestampingConfiguration
    • TimestampingResult
    • TrustVerificationResult
    • VerificationOptions
    • VerificationOptions.CertificateTrustFlag
    • VerificationOptions.SignatureVerificationSecurityLevel
    • VerificationOptions.TimeMode
    • VerificationResult
    • VerificationResult.DigestStatus
    • VerificationResult.DocumentStatus
    • VerificationResult.ModificationPermissionsStatus
    • VerificationResult.TrustStatus
    • ViewChangeCollection
    • ViewerOptimizedOptions
    • WebFontDownloader
    • WordToPDFOptions
  • pdftron.PDF.Annots
    • Caret
    • CheckBoxWidget
    • Circle
    • ComboBoxWidget
    • FileAttachment
    • FileAttachment.Icon
    • FreeText
    • FreeText.IntentName
    • Highlight
    • Ink
    • Line
    • Line.CapPos
    • Line.EndingStyle
    • Line.IntentType
    • Link
    • Link.HighlightingMode
    • ListBoxWidget
    • Markup
    • Markup.BorderEffect
    • Movie
    • Polygon
    • PolyLine
    • PolyLine.IntentType
    • Popup
    • PushButtonWidget
    • RadioButtonGroup
    • RadioButtonWidget
    • Redaction
    • Redaction.QuadForm
    • RubberStamp
    • RubberStamp.Icon
    • Screen
    • Screen.IconCaptionRelation
    • Screen.ScaleCondition
    • Screen.ScaleType
    • SignatureWidget
    • Sound
    • Sound.Icon
    • Square
    • Squiggly
    • StrikeOut
    • Text
    • Text.Icon
    • TextMarkup
    • TextWidget
    • Underline
    • Watermark
    • Widget
    • Widget.HighlightingMode
    • Widget.IconCaptionRelation
    • Widget.ScaleCondition
    • Widget.ScaleType
  • pdftron.PDF.OCG
    • Config
    • Context
    • Context.OCDrawMode
    • Group
    • OCMD
    • OCMD.VisibilityPolicyType
  • pdftron.PDF.PDFA
    • PDFACompliance
    • PDFACompliance.Conformance
    • PDFACompliance.ErrorCode
    • PDFAOptions
  • pdftron.PDF.Struct
    • ContentItem
    • ContentItem.Type
    • SElement
    • STree
  • pdftron.SDF
    • DictIterator
    • DocSnapshot
    • NameTree
    • NameTreeIterator
    • NumberTreeIterator
    • Obj
    • Obj.ObjType
    • ObjSet
    • PDFTronCustomSecurityHandler
    • ResultSnapshot
    • SDFDoc
    • SDFDoc.SaveOptions
    • SecurityHandler
    • SecurityHandler.AlgorithmType
    • SecurityHandler.Permission
    • SignatureHandler
    • SignatureHandlerId
    • UndoManager

Class OfficeToPDFOptions

Inheritance
object
OptionsBase
ConversionOptions
OfficeToPDFOptions
Implements
IDisposable
Inherited Members
ConversionOptions.GetFileExtension()
ConversionOptions.SetFileExtension(string)
ConversionOptions.GetEnableExternalMediaDownloads()
ConversionOptions.SetEnableExternalMediaDownloads(bool)
OptionsBase.mObjSet
OptionsBase.mDict
OptionsBase.ColorPtToNumber(ColorPt)
OptionsBase.ColorPtFromNumber(double)
OptionsBase.GetArray(string)
OptionsBase.PutNumber(string, double)
OptionsBase.PutBool(string, bool)
OptionsBase.PutText(string, string)
OptionsBase.PutRect(string, Rect)
OptionsBase.PushBackNumber(string, double)
OptionsBase.PushBackBool(string, bool)
OptionsBase.PushBackText(string, string)
OptionsBase.PushBackRect(string, Rect)
OptionsBase.RectFromArray(Obj)
OptionsBase.insertRectCollection(string, RectCollection, int)
OptionsBase.GetInternalObj()
OptionsBase.Dispose()
OptionsBase.Dispose(bool)
OptionsBase.Destroy()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: pdftron.PDF
Assembly: PDFTronDotNet.dll
Syntax
public class OfficeToPDFOptions : ConversionOptions, IDisposable

Constructors

OfficeToPDFOptions()

Constructor.

Declaration
public OfficeToPDFOptions()

Methods

GetApplyPageBreaksToSheet()

Gets the value ApplyPageBreaksToSheet from the options object Whether we should split Excel workheets into pages so that the output resembles print output. If set to false (the default), Excel sheets will be placed one per page, except in the case where the sheets are very large

Declaration
public bool GetApplyPageBreaksToSheet()
Returns
Type Description
bool

a bool, Whether we should split Excel workheets into pages so that the output resembles print output. If set to false (the default), Excel sheets will be placed one per page, except in the case where the sheets are very large.

GetDisplayChangeTracking()

Gets the value DisplayChangeTracking from the options object If this option is true, will display office change tracking markup present in the document (i.e, red strikethrough of deleted content and underlining of new content). Otherwise displays the resolved document content, with no markup. Defaults to true.

Declaration
public bool GetDisplayChangeTracking()
Returns
Type Description
bool

a bool, If this option is true, will display office change tracking markup present in the document (i.e, red strikethrough of deleted content and underlining of new content). Otherwise displays the resolved document content, with no markup. Defaults to true..

GetDisplayHiddenText()

Gets the value DisplayHiddenText from the options object Display any hidden text that is present in the document (i.e., text that has been marked as 'Hidden' in the font style). By default, hidden text will not be displayed.

Declaration
public bool GetDisplayHiddenText()
Returns
Type Description
bool

a bool, Display any hidden text that is present in the document (i.e., text that has been marked as 'Hidden' in the font style). By default, hidden text will not be displayed..

GetExcelDefaultCellBorderWidth()

Gets the value ExcelDefaultCellBorderWidth from the options object Cell border width for table cells that would normally be drawn with no border. In units of points. Can be used to achieve a similar effect to the "show gridlines" display option within Microsoft Excel.

Declaration
public double GetExcelDefaultCellBorderWidth()
Returns
Type Description
double

a double, Cell border width for table cells that would normally be drawn with no border. In units of points. Can be used to achieve a similar effect to the "show gridlines" display option within Microsoft Excel..

GetExcelMaxAllowedCellCount()

Gets the value ExcelMaxAllowedCellCount from the options object Conversion will throw an exception if the number of cells in a Microsoft Excel document is above the set MaxAllowedCellCount. Used for early termination of resource intensive conversions. Setting this value to 250000 will allow the vast majority of Excel documents to convert without issue, while keeping RAM usage to a reasonable level. By default there is no limit to the number of allowed cells.

Declaration
public int GetExcelMaxAllowedCellCount()
Returns
Type Description
int

a int, Conversion will throw an exception if the number of cells in a Microsoft Excel document is above the set MaxAllowedCellCount. Used for early termination of resource intensive conversions. Setting this value to 250000 will allow the vast majority of Excel documents to convert without issue, while keeping RAM usage to a reasonable level. By default there is no limit to the number of allowed cells..

GetHideTotalNumberOfPages()

Gets the value HideTotalNumberOfPages from the options object If the document has an element that displays the total number of pages and the total number of pages is unknown beforehand, remove those elements from the document.

Declaration
public bool GetHideTotalNumberOfPages()
Returns
Type Description
bool

a bool, If the document has an element that displays the total number of pages and the total number of pages is unknown beforehand, remove those elements from the document..

GetIncludeBookmarks()

Gets the value IncludeBookmarks from the options object When this option is set to false, Word document bookmarks will not be converted into PDF bookmarks. However, Word headings will still be automatically converted into PDF bookmarks. By default, both Word bookmarks and headings are converted into PDF bookmarks, providing a comprehensive navigation structure within the converted PDF.

Declaration
public bool GetIncludeBookmarks()
Returns
Type Description
bool

a bool, When this option is set to false, Word document bookmarks will not be converted into PDF bookmarks. However, Word headings will still be automatically converted into PDF bookmarks. By default, both Word bookmarks and headings are converted into PDF bookmarks, providing a comprehensive navigation structure within the converted PDF..

GetIncrementalSave()

Gets the value IncrementalSave from the options object If this option is true, the document will be saved incrementally during the conversion, thus reducing the peak memory usage. Save an empty PDFDoc to the target location before the conversion so the incremental saving is done directly to the target location. Otherwise, a temporary file will be used. PDFDoc.Save still has to be called after the conversion is done to finalize the file. Doing PDFDoc.Save with e_incremental flag will reduce the saving time but increase the PDF file size.

Declaration
public bool GetIncrementalSave()
Returns
Type Description
bool

a bool, If this option is true, the document will be saved incrementally during the conversion, thus reducing the peak memory usage. Save an empty PDFDoc to the target location before the conversion so the incremental saving is done directly to the target location. Otherwise, a temporary file will be used. PDFDoc.Save still has to be called after the conversion is done to finalize the file. Doing PDFDoc.Save with e_incremental flag will reduce the saving time but increase the PDF file size..

GetLayoutResourcesPluginPath()

Gets the value LayoutResourcesPluginPath from the options object The path at which the pdftron-provided font resource plugin resides

Declaration
public string GetLayoutResourcesPluginPath()
Returns
Type Description
string

a string, The path at which the pdftron-provided font resource plugin resides.

GetLocale()

Gets the value Locale from the options object ISO 639-1 code of the locale to be applied during conversion. For example: 'en-US', 'ar-SA', 'de-DE', etc. Currently only applied during xls/xlsx conversions.

Declaration
public string GetLocale()
Returns
Type Description
string

a string, ISO 639-1 code of the locale to be applied during conversion. For example: 'en-US', 'ar-SA', 'de-DE', etc. Currently only applied during xls/xlsx conversions..

GetPassword()

Gets the value Password from the options object Password used to decrypt password-protected office documents.

Declaration
public string GetPassword()
Returns
Type Description
string

a string, Password used to decrypt password-protected office documents..

GetResourceDocPath()

Gets the value ResourceDocPath from the options object The path at which a .docx resource document resides

Declaration
public string GetResourceDocPath()
Returns
Type Description
string

a string, The path at which a .docx resource document resides.

GetSmartSubstitutionPluginPath()

Gets the value SmartSubstitutionPluginPath from the options object The path at which the pdftron-provided font resource plugin resides

Declaration
public string GetSmartSubstitutionPluginPath()
Returns
Type Description
string

a string, The path at which the pdftron-provided font resource plugin resides.

GetStructureTagLevel()

Gets the value StructureTagLevel from the options object Specifies the level of document structure tags to include in the PDF for accessibility purposes.

Declaration
public OfficeToPDFOptions.StructureTagLevel GetStructureTagLevel()
Returns
Type Description
OfficeToPDFOptions.StructureTagLevel

a StructureTagLevel, Specifies the level of document structure tags to include in the PDF for accessibility purposes..

GetTemplateLeftDelimiter()

Gets the value TemplateLeftDelimiter from the options object Left delimiter for template tags. Defaults to '{{'.

Declaration
public string GetTemplateLeftDelimiter()
Returns
Type Description
string

a string, Left delimiter for template tags. Defaults to '{{'..

GetTemplateParamsJson()

Gets the value TemplateParamsJson from the options object JSON string representing the data to be merged into a PDFTron office template. For a more featureful template API, see CreateOfficeTemplate.

Declaration
public string GetTemplateParamsJson()
Returns
Type Description
string

a string, JSON string representing the data to be merged into a PDFTron office template. For a more featureful template API, see CreateOfficeTemplate..

GetTemplateRightDelimiter()

Gets the value TemplateRightDelimiter from the options object Right delimiter for template tags. Defaults to '}}'.

Declaration
public string GetTemplateRightDelimiter()
Returns
Type Description
string

a string, Right delimiter for template tags. Defaults to '}}'..

GetTemplateStrictMode()

Gets the value TemplateStrictMode from the options object If "Strict Mode" is enabled, when a template key is missing from the json data an exception will be thrown. If "Strict Mode" is disabled (default), the tag will be replaced with no content.

Declaration
public bool GetTemplateStrictMode()
Returns
Type Description
bool

a bool, If "Strict Mode" is enabled, when a template key is missing from the json data an exception will be thrown. If "Strict Mode" is disabled (default), the tag will be replaced with no content..

GetUpdateTableOfContents()

Gets the value UpdateTableOfContents from the options object Updates the table of contents in the document so it matches the actual locations of headings/bookmarks. By default, the table of contents is not updated. Enabling this option may negatively affect conversion speed.

Declaration
public bool GetUpdateTableOfContents()
Returns
Type Description
bool

a bool, Updates the table of contents in the document so it matches the actual locations of headings/bookmarks. By default, the table of contents is not updated. Enabling this option may negatively affect conversion speed..

SetApplyPageBreaksToSheet(bool)

Sets the value for ApplyPageBreaksToSheet in the options object Whether we should split Excel workheets into pages so that the output resembles print output. If set to false (the default), Excel sheets will be placed one per page, except in the case where the sheets are very large

Declaration
public OfficeToPDFOptions SetApplyPageBreaksToSheet(bool apply_page_breaks)
Parameters
Type Name Description
bool apply_page_breaks

Whether we should split Excel workheets into pages so that the output resembles print output. If set to false (the default), Excel sheets will be placed one per page, except in the case where the sheets are very large

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetDisplayChangeTracking(bool)

Sets the value for DisplayChangeTracking in the options object If this option is true, will display office change tracking markup present in the document (i.e, red strikethrough of deleted content and underlining of new content). Otherwise displays the resolved document content, with no markup. Defaults to true.

Declaration
public OfficeToPDFOptions SetDisplayChangeTracking(bool display_tracking)
Parameters
Type Name Description
bool display_tracking

If this option is true, will display office change tracking markup present in the document (i.e, red strikethrough of deleted content and underlining of new content). Otherwise displays the resolved document content, with no markup. Defaults to true.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetDisplayHiddenText(bool)

Sets the value for DisplayHiddenText in the options object Display any hidden text that is present in the document (i.e., text that has been marked as 'Hidden' in the font style). By default, hidden text will not be displayed.

Declaration
public OfficeToPDFOptions SetDisplayHiddenText(bool display_hidden_text)
Parameters
Type Name Description
bool display_hidden_text

Display any hidden text that is present in the document (i.e., text that has been marked as 'Hidden' in the font style). By default, hidden text will not be displayed.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetExcelDefaultCellBorderWidth(double)

Sets the value for ExcelDefaultCellBorderWidth in the options object Cell border width for table cells that would normally be drawn with no border. In units of points. Can be used to achieve a similar effect to the "show gridlines" display option within Microsoft Excel.

Declaration
public OfficeToPDFOptions SetExcelDefaultCellBorderWidth(double width_in_points)
Parameters
Type Name Description
double width_in_points

Cell border width for table cells that would normally be drawn with no border. In units of points. Can be used to achieve a similar effect to the "show gridlines" display option within Microsoft Excel.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetExcelMaxAllowedCellCount(int)

Sets the value for ExcelMaxAllowedCellCount in the options object Conversion will throw an exception if the number of cells in a Microsoft Excel document is above the set MaxAllowedCellCount. Used for early termination of resource intensive conversions. Setting this value to 250000 will allow the vast majority of Excel documents to convert without issue, while keeping RAM usage to a reasonable level. By default there is no limit to the number of allowed cells.

Declaration
public OfficeToPDFOptions SetExcelMaxAllowedCellCount(int max_cell_count)
Parameters
Type Name Description
int max_cell_count

Conversion will throw an exception if the number of cells in a Microsoft Excel document is above the set MaxAllowedCellCount. Used for early termination of resource intensive conversions. Setting this value to 250000 will allow the vast majority of Excel documents to convert without issue, while keeping RAM usage to a reasonable level. By default there is no limit to the number of allowed cells.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetHideTotalNumberOfPages(bool)

Sets the value for HideTotalNumberOfPages in the options object If the document has an element that displays the total number of pages and the total number of pages is unknown beforehand, remove those elements from the document.

Declaration
public OfficeToPDFOptions SetHideTotalNumberOfPages(bool hide_total_number_of_pages)
Parameters
Type Name Description
bool hide_total_number_of_pages

If the document has an element that displays the total number of pages and the total number of pages is unknown beforehand, remove those elements from the document.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetIncludeBookmarks(bool)

Sets the value for IncludeBookmarks in the options object When this option is set to false, Word document bookmarks will not be converted into PDF bookmarks. However, Word headings will still be automatically converted into PDF bookmarks. By default, both Word bookmarks and headings are converted into PDF bookmarks, providing a comprehensive navigation structure within the converted PDF.

Declaration
public OfficeToPDFOptions SetIncludeBookmarks(bool include_bookmarks)
Parameters
Type Name Description
bool include_bookmarks

When this option is set to false, Word document bookmarks will not be converted into PDF bookmarks. However, Word headings will still be automatically converted into PDF bookmarks. By default, both Word bookmarks and headings are converted into PDF bookmarks, providing a comprehensive navigation structure within the converted PDF.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetIncrementalSave(bool)

Sets the value for IncrementalSave in the options object If this option is true, the document will be saved incrementally during the conversion, thus reducing the peak memory usage. Save an empty PDFDoc to the target location before the conversion so the incremental saving is done directly to the target location. Otherwise, a temporary file will be used. PDFDoc.Save still has to be called after the conversion is done to finalize the file. Doing PDFDoc.Save with e_incremental flag will reduce the saving time but increase the PDF file size.

Declaration
public OfficeToPDFOptions SetIncrementalSave(bool incremental_save)
Parameters
Type Name Description
bool incremental_save

If this option is true, the document will be saved incrementally during the conversion, thus reducing the peak memory usage. Save an empty PDFDoc to the target location before the conversion so the incremental saving is done directly to the target location. Otherwise, a temporary file will be used. PDFDoc.Save still has to be called after the conversion is done to finalize the file. Doing PDFDoc.Save with e_incremental flag will reduce the saving time but increase the PDF file size.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetLayoutResourcesPluginPath(string)

Sets the value for LayoutResourcesPluginPath in the options object The path at which the pdftron-provided font resource plugin resides

Declaration
public OfficeToPDFOptions SetLayoutResourcesPluginPath(string resource_path)
Parameters
Type Name Description
string resource_path

The path at which the pdftron-provided font resource plugin resides

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetLocale(string)

Sets the value for Locale in the options object ISO 639-1 code of the locale to be applied during conversion. For example: 'en-US', 'ar-SA', 'de-DE', etc. Currently only applied during xls/xlsx conversions.

Declaration
public OfficeToPDFOptions SetLocale(string locale_code)
Parameters
Type Name Description
string locale_code

ISO 639-1 code of the locale to be applied during conversion. For example: 'en-US', 'ar-SA', 'de-DE', etc. Currently only applied during xls/xlsx conversions.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetPassword(string)

Sets the value for Password in the options object Password used to decrypt password-protected office documents.

Declaration
public OfficeToPDFOptions SetPassword(string password)
Parameters
Type Name Description
string password

Password used to decrypt password-protected office documents.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetResourceDocPath(string)

Sets the value for ResourceDocPath in the options object The path at which a .docx resource document resides

Declaration
public OfficeToPDFOptions SetResourceDocPath(string resource_path)
Parameters
Type Name Description
string resource_path

The path at which a .docx resource document resides

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetSmartSubstitutionPluginPath(string)

Sets the value for SmartSubstitutionPluginPath in the options object The path at which the pdftron-provided font resource plugin resides

Declaration
public OfficeToPDFOptions SetSmartSubstitutionPluginPath(string plugin_path)
Parameters
Type Name Description
string plugin_path

The path at which the pdftron-provided font resource plugin resides

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetStructureTagLevel(StructureTagLevel)

Sets the value for StructureTagLevel in the options object Specifies the level of document structure tags to include in the PDF for accessibility purposes.

Declaration
public OfficeToPDFOptions SetStructureTagLevel(OfficeToPDFOptions.StructureTagLevel value)
Parameters
Type Name Description
OfficeToPDFOptions.StructureTagLevel value

Specifies the level of document structure tags to include in the PDF for accessibility purposes.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetTemplateLeftDelimiter(string)

Sets the value for TemplateLeftDelimiter in the options object Left delimiter for template tags. Defaults to '{{'.

Declaration
public OfficeToPDFOptions SetTemplateLeftDelimiter(string delim)
Parameters
Type Name Description
string delim

Left delimiter for template tags. Defaults to '{{'.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetTemplateParamsJson(string)

Sets the value for TemplateParamsJson in the options object JSON string representing the data to be merged into a PDFTron office template. For a more featureful template API, see CreateOfficeTemplate.

Declaration
public OfficeToPDFOptions SetTemplateParamsJson(string json_params)
Parameters
Type Name Description
string json_params

JSON string representing the data to be merged into a PDFTron office template. For a more featureful template API, see CreateOfficeTemplate.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetTemplateRightDelimiter(string)

Sets the value for TemplateRightDelimiter in the options object Right delimiter for template tags. Defaults to '}}'.

Declaration
public OfficeToPDFOptions SetTemplateRightDelimiter(string delim)
Parameters
Type Name Description
string delim

Right delimiter for template tags. Defaults to '}}'.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetTemplateStrictMode(bool)

Sets the value for TemplateStrictMode in the options object If "Strict Mode" is enabled, when a template key is missing from the json data an exception will be thrown. If "Strict Mode" is disabled (default), the tag will be replaced with no content.

Declaration
public OfficeToPDFOptions SetTemplateStrictMode(bool strict_mode)
Parameters
Type Name Description
bool strict_mode

If "Strict Mode" is enabled, when a template key is missing from the json data an exception will be thrown. If "Strict Mode" is disabled (default), the tag will be replaced with no content.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

SetUpdateTableOfContents(bool)

Sets the value for UpdateTableOfContents in the options object Updates the table of contents in the document so it matches the actual locations of headings/bookmarks. By default, the table of contents is not updated. Enabling this option may negatively affect conversion speed.

Declaration
public OfficeToPDFOptions SetUpdateTableOfContents(bool update_table_of_contents)
Parameters
Type Name Description
bool update_table_of_contents

Updates the table of contents in the document so it matches the actual locations of headings/bookmarks. By default, the table of contents is not updated. Enabling this option may negatively affect conversion speed.

Returns
Type Description
OfficeToPDFOptions

this object, for call chaining

Implements

IDisposable
In This Article
Back to top Generated by DocFX