I am having an issue using the Node.js version of the Aspose Words Cloud. Specifically, when trying to convert a PDF to HTML and generate separate HTML files for each page in the PDF. Below is my code
const htmlSaveOptionsData = new asposeWords.HtmlSaveOptionsData({
documentSplitCriteria: ‘PageBreak’,
fileName : ‘converting-to.html’,
saveFormat : ‘html’
});
const convertDocToHtmlRequest = new asposeWords.SaveAsRequest({
name : ‘converting-from.pdf’,
saveOptionsData : htmlSaveOptionsData
});
const docToHtmlResponse = await asposeWordsApi.saveAs(convertDocToHtmlRequest)
The issue seems to be with documentSplitCriteria. I get an error back in the response saying
Document part file cannot be written. When saving the document either output file name should be specified or custom streams should be provided via DocumentPartSavingCallback
However, I am already passing in an output file name, and the Node.js version does not seem to support the DocumentPartSavingCallback parameter. I see it detailed within the Java and .NET documentation, but nowhere in the Node.js documentation. In fact, the builtin request serialization does not appear to allow for a parameter of this name.
Does the Node.js version of Aspose Words Cloud even support splitting an HTML file based on page when converting from a PDF? And if so, what do I need to change in my request to get it to work?