Converts a document to the specified supported conversion format.
Returns a https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise resolving to an ArrayBuffer of the converted document, or rejecting with a NutrientViewer.Error.
ArrayBuffer
It requires a configuration object. If the configuration is invalid, the promise will be rejected with a NutrientViewer.Error.
A configuration Object.
Format to export the document to.
Promise that resolves to an ArrayBuffer of the converted file
NutrientViewer.convertToOffice({ document: "/article.pdf", licenseKey: "YOUR_LICENSE_KEY",},NutrientViewer.OfficeDocumentFormat.docx).then((arrayBuffer) => { console.log("Successfully converted document", arrayBuffer);}).catch((error) => { console.error(error.message);})@public Copy
NutrientViewer.convertToOffice({ document: "/article.pdf", licenseKey: "YOUR_LICENSE_KEY",},NutrientViewer.OfficeDocumentFormat.docx).then((arrayBuffer) => { console.log("Successfully converted document", arrayBuffer);}).catch((error) => { console.error(error.message);})@public
Converts a document to the specified supported conversion format.
Returns a https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise resolving to an
ArrayBufferof the converted document, or rejecting with a NutrientViewer.Error.It requires a configuration object. If the configuration is invalid, the promise will be rejected with a NutrientViewer.Error.