We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Retain Frame Borders & Position during Converting ODT to HTML File using C# .NET API

Hi, with the latest version of Aspose words for Net (20.8.0 - at the time of writing), when converting an odt file to its html representation the frames border and position is lost.

I’ve attached in the archive:

  1. The code I’ve used for conversion
  2. The input file
  3. The generated html.

FramesLost_input_output_code.zip (44.1 KB)

@arnoldbeilandevozon,

You are right; Aspose.Words for .NET should preserve frame borders and position during converting ODT to HTML file format. We have logged this problem in our issue tracking system with ID WORDSNET-20892 and will keep you updated on the status of correction. We apologize for your inconvenience.

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

@awais.hafeez

This bug is not fixed. I’ve generated the output with the same code using Aspose.Words 21.2.0 now. See the output attached, the bottom border is still missing and the frame is not centered. Even if centering is not possible, we would still need the borders to show up correctly.

output_new.zip (1.1 KB)

Regards,
Arnold

@arnoldbeilandevozon,

I am afraid, the positioning of the frame in HTML cannot be improved, because frames with text wrapping are not fully supported in HTML documents. The solution is to use Html Fixed file format:

Document doc = new Document("C:\\temp\\FramesLost_input_output_code\\frames_lost_input_file.odt");
HtmlFixedSaveOptions options = new HtmlFixedSaveOptions();
doc.Save("C:\\Temp\\FramesLost_input_output_code\\21.3 fixed.html", options);

Secondly, you’re right, frame’s bottom border is missing in output HTML. To address this problem, we have logged a separate issue with ID WORDSNET-20892. We will keep you updated on the status of correction. We apologize for your inconvenience.

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