Nutrient Web SDK

ReferenceOfficeConversionSettings

Type Alias OfficeConversionSettings

*** Standalone Only ***

Options for exporting the document to PDF from an office format.

Some properties are only used when exporting specific Office formats, such as XLSX or DOCX.

Type AliasStandalone

Example

const officeDocument = await fetch('example.xlsx').then(response => response.arrayBuffer())
NutrientViewer.convertToPDF(file, null, {
splitExcelSheetsIntoPages: true,
spreadsheetMaximumContentHeightPerSheet: 1000,
spreadsheetMaximumContentWidthPerSheet: 50,
})
const officeDocument = await fetch('example.docx').then(response => response.arrayBuffer())
NutrientViewer.convertToPDF(file, null, {
documentMarkupMode: 'original',
})

Default Value

{ splitExcelSheetsIntoPages: false, spreadsheetRenderOnlyPrintArea: true, documentMarkupMode: 'noMarkup' }

Properties

"noMarkup" | "original" | "simpleMarkup" | "allMarkup"
boolean

If true, each sheet in the Excel document will be exported as a separate page in the PDF.

number

The maximum height of the content in a single sheet. If the content exceeds this height, it will be split into multiple pages.

number

The maximum width of the content in a single sheet. If the content exceeds this width, it will be split into multiple pages.

boolean

If true, only the print area of spreadsheet sheets will be rendered. If no print area is defined, the entire sheet is rendered.