Class: OfficeToPDFOptions

Core.PDFNet.Convert. OfficeToPDFOptions


new OfficeToPDFOptions( [json])

An object containing options for wordToPdf functions
Parameters:
Name Type Argument Description
json string <optional>
options in JSON format.

Extends

  • ConversionOptions

Members


<static> StructureTagLevel

Level of detail for structure tags.
Properties:
Name Type Description
e_default number Default level of structure tags, good for accessibility.
e_none number No structure tags. This can be used to get smaller file sizes.

Methods


setApplyPageBreaksToSheet(value)

Sets the value for ApplyPageBreaksToSheet in the options object Whether we should split Excel workheets into pages so that the output resembles print output.
Parameters:
Name Type Description
value boolean the new value for ApplyPageBreaksToSheet
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setDisplayChangeTracking(value)

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.
Parameters:
Name Type Description
value boolean the new value for DisplayChangeTracking
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setDisplayHiddenText(value)

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.
Parameters:
Name Type Description
value boolean the new value for DisplayHiddenText
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setExcelDefaultCellBorderWidth(width)

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.
Parameters:
Name Type Description
width number the new value for ExcelDefaultCellBorderWidth
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setExcelMaxAllowedCellCount(value)

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.
Parameters:
Name Type Description
value number the new value for ExcelMaxAllowedCellCount
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setHideTotalNumberOfPages(value)

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.
Parameters:
Name Type Description
value boolean the new value for HideTotalNumberOfPages
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setIncludeBookmarks(value)

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.
Parameters:
Name Type Description
value boolean the new value for IncludeBookmarks
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setIncrementalSave(value)

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.
Parameters:
Name Type Description
value boolean the new value for IncrementalSave
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setLocale(value)

Sets the value for Locale in the options object ISO 639-1 code of the current system locale. For example: 'en-US', 'ar-SA', 'de-DE', etc.
Parameters:
Name Type Description
value string the new value for Locale
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setPassword(value)

Sets the value for Password in the options object Password used to decrypt password-protected office documents.
Parameters:
Name Type Description
value string the new value for Password
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setStructureTagLevel(value)

Sets the value for StructureTagLevel in the options object Specifies the level of document structure tags to include in the PDF for accessibility purposes.
Parameters:
Name Type Description
value Core.PDFNet.Convert.OfficeToPDFOptions.StructureTagLevel the new value for StructureTagLevel.
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setTemplateParamsJson(value)

Sets the value for TemplateParamsJson in the options object JSON string representing the data to be merged into a PDFTron office template
Parameters:
Name Type Description
value string the new value for TemplateParamsJson
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions

setUpdateTableOfContents(value)

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.
Parameters:
Name Type Description
value boolean the new value for UpdateTableOfContents
Returns:
this object, for call chaining
Type
Core.PDFNet.Convert.OfficeToPDFOptions