• Apryse API
Show / Hide Table of Contents
  • pdftron
    • PDFNet
    • PDFNet.CMSType
    • PDFNet.CharacterOrdering
    • 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
    • BarcodeModule
    • BarcodeOptions
    • BarcodeOptions.BarcodeOrientation
    • BarcodeOptions.BarcodeProfile
    • BarcodeOptions.BarcodeTypeGroup
    • BarcodeOptions.OutputFormat
    • BitmapInfo
    • Bookmark
    • CADConvertOptions
    • CADConvertOptions.LayoutSortOrder
    • CADModule
    • CMSSignatureOptions
    • CharData
    • CharIterator
    • 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.StructuredOutputOptions
    • Convert.StructuredOutputOptions.SectionConversionSetting
    • 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
    • FindReplace
    • FindReplaceOptions
    • FindReplaceOptions.HorizAlignment
    • FindReplaceOptions.MatchType
    • FindReplaceOptions.ReflowType
    • Flattener
    • Flattener.FlattenMode
    • Flattener.Threshold
    • Font
    • Font.Encoding
    • Font.StandardType1Font
    • Font.Type
    • FontCharCodeIterator
    • Function
    • Function.Type
    • GSChangesIterator
    • GState
    • GState.BlendMode
    • GState.GStateAttribute
    • GState.LineCap
    • GState.LineJoin
    • GState.RenderingIntent
    • GState.TextRenderingMode
    • GeometryCollection
    • GeometryCollectionSnappingMode
    • HTML2PDF
    • HTML2PDF.Proxy
    • HTML2PDF.Proxy.Type
    • HTML2PDF.TOCSettings
    • HTML2PDF.WebPageSettings
    • HTML2PDF.WebPageSettings.ErrorHandling
    • Highlights
    • Image
    • Image.InputFilter
    • Image2RGB
    • Image2RGBA
    • MergeXFDFOptions
    • OCRModule
    • OCROptions
    • OfficeToPDFOptions
    • OfficeToPDFOptions.AnimationMode
    • OfficeToPDFOptions.DisplayComments
    • OfficeToPDFOptions.DisplaySpeakerNotes
    • OfficeToPDFOptions.StructureTagLevel
    • OfficeToPDFOptions.UpdateDynamicFields
    • Optimizer
    • Optimizer.ImageSettings
    • Optimizer.ImageSettings.CompressionMode
    • Optimizer.ImageSettings.DownsampleMode
    • Optimizer.MonoImageSettings
    • Optimizer.MonoImageSettings.CompressionMode
    • Optimizer.MonoImageSettings.DownsampleMode
    • Optimizer.OptimizerSettings
    • Optimizer.TextSettings
    • OptionsBase
    • 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
    • Page
    • Page.Box
    • Page.Rotate
    • PageIterator
    • PageLabel
    • PageLabel.Style
    • PageSet
    • PageSet.Filter
    • PathData
    • PathData.PathSegmentType
    • PatternColor
    • PatternColor.TilingType
    • PatternColor.Type
    • Point
    • Print
    • PrintToPdfModule
    • PrintToPdfOptions
    • PrinterMode
    • PrinterMode.DuplexMode
    • PrinterMode.NUp
    • PrinterMode.NUpPageOrder
    • PrinterMode.Orientation
    • PrinterMode.OutputColor
    • PrinterMode.OutputQuality
    • PrinterMode.PaperSize
    • PrinterMode.PrintContentTypes
    • PrinterMode.ScaleType
    • QuadPoint
    • Rect
    • RectCollection
    • Redactor
    • Redactor.Appearance
    • Redactor.Redaction
    • Reflow
    • RefreshOptions
    • SVGConvertOptions
    • Shading
    • Shading.Type
    • ShapedText
    • ShapedText.FailureReason
    • ShapedText.ShapingStatus
    • Stamper
    • Stamper.HorizontalAlignment
    • Stamper.SizeType
    • Stamper.TextAlignment
    • Stamper.VerticalAlignment
    • StructuredOutputModule
    • TaggingOptions
    • TemplateDocument
    • TemplateDocumentResult
    • TextDiffOptions
    • TextExtractor
    • TextExtractor.CharRange
    • TextExtractor.Line
    • TextExtractor.ProcessingFlags
    • TextExtractor.Style
    • TextExtractor.Word
    • TextExtractor.XMLOutputFlags
    • TextRange
    • TextSearch
    • TextSearch.ResultCode
    • TextSearch.SearchMode
    • TimestampingConfiguration
    • TimestampingResult
    • TransPDF
    • TransPDFOptions
    • 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
    • PolyLine
    • PolyLine.IntentType
    • Polygon
    • 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.PDFUA
    • PDFUAConformance
    • PDFUAConformance.Level
    • PDFUAOptions
  • 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

GetAnimationHandling()

Gets the value AnimationHandling from the options object. Specifies the handling of animations present in the PowerPoint document. By default, animations will be ignored and only the default content of each slide will be displayed.

Declaration
public OfficeToPDFOptions.AnimationMode GetAnimationHandling()
Returns
Type Description
OfficeToPDFOptions.AnimationMode

The current value for AnimationHandling.

GetApplyPageBreaksToSheet()

Gets the value ApplyPageBreaksToSheet from the options object. Whether we should split Excel worksheets 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

The current value for ApplyPageBreaksToSheet.

GetDisableExcelHeadersFooters()

Gets the value DisableExcelHeadersFooters from the options object. Disables the conversion of Excel headers and footers. When this flag is set to True, any headers or footers in the original Excel sheet will be ignored in the output.

Declaration
public bool GetDisableExcelHeadersFooters()
Returns
Type Description
bool

The current value for DisableExcelHeadersFooters.

GetDisableExcelMargins()

Gets the value DisableExcelMargins from the options object. Sets Excel page margins to zero. When this flag is set to True, the output pages of the Excel conversion will have no margins.

Declaration
public bool GetDisableExcelMargins()
Returns
Type Description
bool

The current value for DisableExcelMargins.

GetDisableSheetHeightLimit()

Gets the value DisableSheetHeightLimit from the options object. Removes the default sheet height limit of 12 feet, after which the sheet would be divided into pages up to 4 feet long each. When this flag is set to True and ApplyPageBreaksToSheet is set to False, each page will contain the entire corresponding sheet.

Declaration
public bool GetDisableSheetHeightLimit()
Returns
Type Description
bool

The current value for DisableSheetHeightLimit.

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

The current value for DisplayChangeTracking.

GetDisplayComments()

Gets the value DisplayComments from the options object. Specifies the display of comments that are present in the document. By default, comments will not be displayed.

Declaration
public OfficeToPDFOptions.DisplayComments GetDisplayComments()
Returns
Type Description
OfficeToPDFOptions.DisplayComments

The current value for DisplayComments.

GetDisplayHiddenCells()

Gets the value DisplayHiddenCells from the options object. Display any hidden rows and columns present in the Excel sheet (i.e., rows/columns with visibility set as 'hidden'). By default, hidden cells will not be displayed.

Declaration
public bool GetDisplayHiddenCells()
Returns
Type Description
bool

The current value for DisplayHiddenCells.

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

The current value for DisplayHiddenText.

GetDisplaySpeakerNotes()

Gets the value DisplaySpeakerNotes from the options object. Specifies the display of speaker notes that are present in the PowerPoint document. By default, speaker notes will not be displayed.

Declaration
public OfficeToPDFOptions.DisplaySpeakerNotes GetDisplaySpeakerNotes()
Returns
Type Description
OfficeToPDFOptions.DisplaySpeakerNotes

The current value for DisplaySpeakerNotes.

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

The current value for ExcelDefaultCellBorderWidth.

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

The current value for ExcelMaxAllowedCellCount.

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

The current value for HideTotalNumberOfPages.

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

The current value for IncludeBookmarks.

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

The current value for IncrementalSave.

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

The current value for Locale.

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

The current value for Password.

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.

GetShowExcelGridlines()

Gets the value ShowExcelGridlines from the options object. Forces Excel gridlines to appear in the output when they are not enabled in the original sheet.

Declaration
public bool GetShowExcelGridlines()
Returns
Type Description
bool

The current value for ShowExcelGridlines.

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

The current value for StructureTagLevel.

GetTemplateLeftDelimiter()

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

Declaration
public string GetTemplateLeftDelimiter()
Returns
Type Description
string

The current value for TemplateLeftDelimiter.

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

The current value for TemplateParamsJson.

GetTemplateRightDelimiter()

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

Declaration
public string GetTemplateRightDelimiter()
Returns
Type Description
string

The current value for TemplateRightDelimiter.

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

The current value for TemplateStrictMode.

GetUpdateDynamicFields()

Gets the value UpdateDynamicFields from the options object. Specifies which dynamic fields should be updated within the document. By default, dynamic fields will display cached field values, which is consistent with the PDF export behaviour of Word. This option allows fine-tuning which types of dynamic fields are updated, which would otherwise have to be done manually in Word. Updating dynamic fields can improve the accuracy of field content, though it may increase conversion time. Some dynamic fields such as page numbers are always updated regardless of this setting.

Declaration
public OfficeToPDFOptions.UpdateDynamicFields GetUpdateDynamicFields()
Returns
Type Description
OfficeToPDFOptions.UpdateDynamicFields

The current value for UpdateDynamicFields.

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

The current value for UpdateTableOfContents.

SetAnimationHandling(AnimationMode)

Sets the value for AnimationHandling in the options object. Specifies the handling of animations present in the PowerPoint document. By default, animations will be ignored and only the default content of each slide will be displayed.

Declaration
public OfficeToPDFOptions SetAnimationHandling(OfficeToPDFOptions.AnimationMode value)
Parameters
Type Name Description
OfficeToPDFOptions.AnimationMode value

The new value for AnimationHandling.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetApplyPageBreaksToSheet(bool)

Sets the value for ApplyPageBreaksToSheet in the options object. Whether we should split Excel worksheets 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

The new value for ApplyPageBreaksToSheet.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetDisableExcelHeadersFooters(bool)

Sets the value for DisableExcelHeadersFooters in the options object. Disables the conversion of Excel headers and footers. When this flag is set to True, any headers or footers in the original Excel sheet will be ignored in the output.

Declaration
public OfficeToPDFOptions SetDisableExcelHeadersFooters(bool disable_excel_headers_footers)
Parameters
Type Name Description
bool disable_excel_headers_footers

The new value for DisableExcelHeadersFooters.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetDisableExcelMargins(bool)

Sets the value for DisableExcelMargins in the options object. Sets Excel page margins to zero. When this flag is set to True, the output pages of the Excel conversion will have no margins.

Declaration
public OfficeToPDFOptions SetDisableExcelMargins(bool disable_excel_margins)
Parameters
Type Name Description
bool disable_excel_margins

The new value for DisableExcelMargins.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetDisableSheetHeightLimit(bool)

Sets the value for DisableSheetHeightLimit in the options object. Removes the default sheet height limit of 12 feet, after which the sheet would be divided into pages up to 4 feet long each. When this flag is set to True and ApplyPageBreaksToSheet is set to False, each page will contain the entire corresponding sheet.

Declaration
public OfficeToPDFOptions SetDisableSheetHeightLimit(bool disable_sheet_height_limit)
Parameters
Type Name Description
bool disable_sheet_height_limit

The new value for DisableSheetHeightLimit.

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

The new value for DisplayChangeTracking.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetDisplayComments(DisplayComments)

Sets the value for DisplayComments in the options object. Specifies the display of comments that are present in the document. By default, comments will not be displayed.

Declaration
public OfficeToPDFOptions SetDisplayComments(OfficeToPDFOptions.DisplayComments value)
Parameters
Type Name Description
OfficeToPDFOptions.DisplayComments value

The new value for DisplayComments.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetDisplayHiddenCells(bool)

Sets the value for DisplayHiddenCells in the options object. Display any hidden rows and columns present in the Excel sheet (i.e., rows/columns with visibility set as 'hidden'). By default, hidden cells will not be displayed.

Declaration
public OfficeToPDFOptions SetDisplayHiddenCells(bool display_hidden_cells)
Parameters
Type Name Description
bool display_hidden_cells

The new value for DisplayHiddenCells.

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

The new value for DisplayHiddenText.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetDisplaySpeakerNotes(DisplaySpeakerNotes)

Sets the value for DisplaySpeakerNotes in the options object. Specifies the display of speaker notes that are present in the PowerPoint document. By default, speaker notes will not be displayed.

Declaration
public OfficeToPDFOptions SetDisplaySpeakerNotes(OfficeToPDFOptions.DisplaySpeakerNotes value)
Parameters
Type Name Description
OfficeToPDFOptions.DisplaySpeakerNotes value

The new value for DisplaySpeakerNotes.

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

The new value for ExcelDefaultCellBorderWidth.

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

The new value for ExcelMaxAllowedCellCount.

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

The new value for HideTotalNumberOfPages.

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

The new value for IncludeBookmarks.

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

The new value for IncrementalSave.

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

The new value for Locale.

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

The new value for Password.

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

SetShowExcelGridlines(bool)

Sets the value for ShowExcelGridlines in the options object. Forces Excel gridlines to appear in the output when they are not enabled in the original sheet.

Declaration
public OfficeToPDFOptions SetShowExcelGridlines(bool show_excel_gridlines)
Parameters
Type Name Description
bool show_excel_gridlines

The new value for ShowExcelGridlines.

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

The new value for StructureTagLevel.

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

The new value for TemplateLeftDelimiter.

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

The new value for TemplateParamsJson.

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

The new value for TemplateRightDelimiter.

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

The new value for TemplateStrictMode.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

SetUpdateDynamicFields(UpdateDynamicFields)

Sets the value for UpdateDynamicFields in the options object. Specifies which dynamic fields should be updated within the document. By default, dynamic fields will display cached field values, which is consistent with the PDF export behaviour of Word. This option allows fine-tuning which types of dynamic fields are updated, which would otherwise have to be done manually in Word. Updating dynamic fields can improve the accuracy of field content, though it may increase conversion time. Some dynamic fields such as page numbers are always updated regardless of this setting.

Declaration
public OfficeToPDFOptions SetUpdateDynamicFields(OfficeToPDFOptions.UpdateDynamicFields value)
Parameters
Type Name Description
OfficeToPDFOptions.UpdateDynamicFields value

The new value for UpdateDynamicFields.

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

The new value for UpdateTableOfContents.

Returns
Type Description
OfficeToPDFOptions

This object, for call chaining.

Implements

IDisposable
In this article
Back to top Generated by DocFX