Free Support Forum - aspose.com

Unable to view Aspose.Words generated DOCX file with MS WORD WEB APP using Java

Hi,


We are using ASPOSE.WORD apis to convert HTML into DOCX document.
When I open the converted document from Office word, it looks good. But when i open the same docx document from word web part, i lost the spacing between paragraph.
Please see the attached output document(Output document.docx). When we open this from word web part, the output looks like the attached screenshot(Web part screenshot.PNG).

Sample code which i am using for conversion

InputStream is = xml.getInputStream();
// Load the document.
LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFormat(LoadFormat.HTML);
// Open the workbook
Document convDoc = new Document(is, loadOptions);
// Create a new memory stream.
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
// Save the document to stream.
convDoc.save(outStream, SaveFormat.DOC);
Document newDoc = new Document(new ByteArrayInputStream(outStream.toByteArray()));
ByteArrayOutputStream newOutStream = new ByteArrayOutputStream();
newDoc.save(newOutStream, SaveFormat.DOCX);

I am attaching following files

Input html file : Input Html document.zip
Output word document: Output document.docx
Screenshot of word web part: Web part screenshot.png

Thanks in advance for your help.

Hi,


Any update on this?
I am sorry for pushing but this is a critical issue and we need to make some decision based on this.

Hi Carlton,

Thanks for your query. We are working over your issue and will update you asap.

Any updates?

Hi
Carlton,


Thanks for your inquiry and sorry for the delayed response.

I was unable to edit the output DOCX file, i.e. generated by ‘Aspose.Words for JAVA’ v11.4.0, in web browser by using Microsoft Word Web App on my side. When I open DOCX in browser, ‘The document could not be opened for editing’ error message is thrown. I have logged this potential issue in our bug tracking system. The issue ID is WORDSNET-6526. Your request has been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as WORDSNET-6526) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan