Class OfficeToPDFOptions
Inherited Members
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public class OfficeToPDFOptions : ConversionOptions
Constructors
OfficeToPDFOptions()
Constructor.
Declaration
public OfficeToPDFOptions()
Methods
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 | 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 |
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 | 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. |
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 | Specifies the display of comments that are present in the document. By default, comments will not be displayed. |
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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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 |
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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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. |
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 | Specifies the display of comments that are present in the document. By default, comments will not be displayed. |
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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
double | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
int | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
string | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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 value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | 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. |