Layout issue using reporting engine HTML tag

Hello,

I’m using a word template containing an HTML tag. I have restitution issues on PDF.

In my example, number are displayed through 2 lines, empty column are too large.

Is there a way to optimize PDF resitution?

In the enclosed file you can find:

  • Solution to test

  • mypdf2074601653.Pdf: pdf generated by solution not optimised

    • empty column too large for example

    • number are displayed on 2 lines

    • some empty spaces could be removed

  • pdf_comment.jpg: feedback on column size, not optimised (empty column too large for example), number are displayed on 2 lines

  • mydoc2087742208.Docx: doc created from the same template; not issue.

  • awaited PDF_same HTML source.jpg: awaited restituction with column size optimization

  • template.docx: Template used

  • test.html: HTML source

Thank you for your helpAspose.zip (445.1 KB)

@bgam Thank you for reporting the problem to us. For a sake of correction it has been logged as WORDSNET-24703. We will keep you informed and let you know once it is resolved.
Also, please note, while inserting HTML into the document, Aspose.Words converts it to Aspose.Words DOM and mimics MS Word behavior and not browser behavior upon this. So after inserting HTML into the document it might look different than in the browser due to the differences in HTML and MS Word documents models and limitations of MS Word formats.

@alexey.noskov: thanks for your feedback.
For information, as you could see in zip file, I have no issue when reporting is saved as doc file. Issue is only on PDF saving.
Thanks for your help

@bgam Thank you for additional information. Yes, I have noticed the difference in the table layout in the produced DOCX and PDF document. This is the problem logged as WORDSNET-24703. Looks like our table layout engine does not process this table as MS Word does. We will keep you informed and let you know once the issue is resolved.

@alexey.noskov: hi, did you have any update about this subject? Thank you

@bgam The issue occurs because table column widths are not calculated correctly by Aspose.Words for a table with missing column widths data.

The issue is to be addressed by the new table layout algorithm being implemented per WORDSNET-832. The algorithm is not applied to the problematic table because auto-fit tables with “don’t wrap text” options are not yet supported. Also, in the original scenario the source document is .html, and the algorithm is not applied to html source yet as there were some issues when it was attempted.

Currently the issue is postponed until the main WORDSNET-832 issue is resolved. Unfortunately due to the complexity of the task there are no estimate at the moment.

@alexey.noskov: hi, did you have any update about this subject or about the main subject? Thank you

@bgam Unfortunately, there are no news regarding the issue yet. It is still postponed. Please accept our apologies for your inconvenience.

@alexey.noskov: hi, did you have any update about this subject or about the main subject? Thank you

@bgam Unfortunately, there are still no news regarding the issue. We are continuously work on improving table layout algorithm in Aspose.Words. But since this is not trivial task, there are not estimates of completion.

The issues you have found earlier (filed as WORDSNET-24703) have been fixed in this Aspose.Words for .NET 23.10 update also available on NuGet.