Doc to html conversion using aspose.words java version 20.8

We are facing issue when converting doc to html we are facing issue when converting tables missing inside a table

Hi Aspose team,

Please find the zipped doc file. when we convert it to single html table inside a table is missing.

123ecodetimereporting.zip (16.9 KB)

@sravan_reddy,

We have converted your “123ecodetimereporting.doc” document to HTML format by using the latest (20.11) version of Aspose.Words for Java on our end and attached the HTML file here for your reference:

Here is the Java code that we used on our end to produce above HTML file:

Document doc = new Document("C:\\123ecodetimereporting\\123ecodetimereporting.doc");
doc.save("C:\\123ecodetimereporting\\awjava-20.11.html");

Do you see the same problem in “awjava-20.11.html”? If yes, then please create and attach here a comparison screenshot which highlights the problematic areas in this Aspose.Words generated HTML (with respect to original document). We will then investigate the issue further and provide you more information.

Hi ,

We are using aspose.words java version 20.8. We cant use latest version as our subscription got expired. Yes it is converting fine even with this version if we pass the file from our local directory like you did. But actually in our project getting these doc files from SFTP windows server so we are passing file as inputstream to the Document in the code then we are facing this issue. Attached images of both Org doc and html where issue occurred. And in our code we are using HtmlSaveOptions to export images and fonts as base64 and we are expecting single html file here.

Thanks,
Sravan 20201201_170807.jpg (1.9 MB)
20201201_175544.jpg (1.5 MB)

@sravan.matta,

Please ZIP and attach your Aspose.Words generated HTML file showing the undesired behavior here for our reference. Please also provide piece of source code that we can use to reproduce the same problem on our end. We will then investigate the issue further on our end and provide you more information.

Hi,

Sure i am giving code snippet and attaching generated HTML as well. Please get back us with some solution as our application feature stopped working due to this. Pls guide us on how we get header and footer of each doc page when it converts to html. I see getting footer on last page only.

com.aspose.words.Document document = new com.aspose.words.Document(inputStream);
com.aspose.words.HtmlSaveOptions saveOptions = new com.aspose.words.HtmlSaveOptions(
SaveFormat.HTML);
saveOptions.setExportFontsAsBase64(true);
saveOptions.setExportImagesAsBase64(true);
saveOptions.setExportPageMargins(true);
saveOptions.setCssStyleSheetType(CssStyleSheetType.EMBEDDED);
saveOptions.setPrettyFormat(true);
ByteArrayOutputStream bao = new ByteArrayOutputStream();
document.save(bao, saveOptions);

123E Code Time Reporting.zip (22.0 KB)

Thanks,
Sravan

@sravan_reddy,

I am afraid, we are still unable to reproduce this problem on our end when converting this Word document (test doc file.zip (16.7 KB)) to HTML format. Can you please double check if you had shared a correct DOC file here for testing? Do you see the same problem when converting this DOC to PDF and other supported formats? Or this problem occurs only when saving to HTML format? Thanks for your cooperation.

@awais.hafeez

What else do i need to share? :slightly_smiling_face:. I shared you both Original doc, migrated html and even images too when exactly issue happed. As i said before its converting fine if we pass file from local directory but when it takes from SFTP windows server then base64 images missing inside all the tables which you can see in the HTML which i sent you before. We didn’t try doc to pdf as we need doc to html only. Please pass the same file as Inputstream once and check. But we are still facing this issue. And also how do we get header and footer of each page of the doc when it converts to html.

@sravan_reddy,

For the sake of any corrections in Aspose.Words for Java API, we have logged this problem in our issue tracking system. Your ticket number is WORDSNET-21518. We will further look into the details of this problem and will keep you updated on the status of the linked issue. We apologize for any inconvenience.

Please refer to following pages:

Pls tell us why its happening asap. Its a main feature in our application.

@sravan_reddy,

WORDSNET-21518 is currently pending for analysis and is in the queue. We will inform you via this forum thread as soon as we have any more updates on it. We apologize for any inconvenience.

@sravan_reddy,

We also need to reproduce this issue in the context of SFTP. So, please provide the complete code of “inputStream”. We will then investigate the issue further on our end and provide you more information.

The issues you have found earlier (filed as WORDSNET-21518) have been fixed in this Aspose.Words for .NET 21.4 update and this Aspose.Words for Java 21.4 update.