Texts are not aligned in output file ECDCTS-8751

Hi Team,

We are trying to transformation input file with below code.

String fileName = "C:\\Input\\HTML.html";
com.aspose.words.Document document = new com.aspose.words.Document(fileName);
document.save("C:\\output\\html.pdf");

files.zip (60.0 KB)

In output pdf file texts are not aligned properly.

Thanks,
Arvind

We have reproduced and logged the issue as WORDSNET-24039 . We will keep you informed and let you know once it has been resolved.

Hi Team ,

Any update on this issue?
Customer is asking for ETA?

Thanks,
Arvind

@rnara Unfortunately, the ticket has “Postponed” status at the moment. The issue analysis has shown that it will be necessary to implement new functionality and carry out extensive testing work on the existing documents to exclude regression.
As a temporary solution, we suggest you to set LeftMargin value manually, while the problem is being fixed.

...
doc.getFirstSection().getPageSetup().setLeftMargin(100);
document.save("C:\\output\\html.pdf");

Hi Team,

I tried the above workaround but in rendered pdf texts are shifted to right. I have attached output file and marked the issue in image file.

Also, header is not getting render in output file. I have marked the issue in output image file and attached output pdf.
newfiles.zip (261.0 KB)

Thanks,
Arvind

@rnara You can also consider converting Html -> Docx -> Pdf as a workaround.

Document document = new Document(fileName);
// Save and load from temporary Docx.
doc.save("html_tmp.docx");
doc = new Document("html_tmp.docx");
doc.save("output.pdf");

Hi Team,

We have notice header is also not rendered in output file.
Error.png (235.4 KB)

Thanks,
Arvind

@rnara There is Row containing two images with AltText at the top of the page. Both images are not available via link, that is why AltText is displayed. However, the way AltText is shown in Web browser and in MS Word is different. Since the images’ sizes are set in Html, AltText is not visible behind them. You can open the original “HTML.html” in MS Word and make sure it displays exactly like Aspose.Words does.

Hi Team,

Any update on this issue? Customer is waiting for very long time and asking for ETA?

Thanks,
Arvind

@rnara Analysis of this issue has been completed. The issue occurs because table column widths are not calculated correctly in absence of width generated by MS Word for an auto-fit table in html document. The issue is to be addressed by the new table grid algorithm we are currently working on. Currently the new logic is not applied to html input as there were issues with some of the test documents. The issue has been postponed until grid re-calculation for html input is supported.

@alexey.noskov : It has been a month since last update. This is critical issue for customer. Please provide ETA for the fix.

Thanks
Rama

@rnara Unfortunately, there are no news regarding this issue yet. Please accept our apologies for your inconvenience.

@alexey.noskov : Please share ETA for the fix. Customer is chasing for the fix.

Thanks
Rama

@rnara Unfortunately, the issue is still not scheduled for development and there is no estimate. It is blocked by the main issue WORDSNET-832 related to table grid calculation. You should note that table grid calculation is an extremally complex task and we continuously work on it. As a temporary solution you can use the approach suggested by Vadim:

Document document = new Document(fileName);
// Save and load from temporary Docx.
doc.save("html_tmp.docx");
doc = new Document("html_tmp.docx");
doc.save("output.pdf");

Hi Team,

Any update on this issue?
Customer is waiting for fix.

Thanks,
Arvind

@rnara Unfortunately, there are no news regarding this issue, it is still postponed until work on the main WORDSNET-832 is finished. Please accept our apologies for your inconvenience.

Hi Team,

Any update on this issue ?

Thanks,
Arvind

@rnara Unfortunately, there are still no news regarding this issue. The issue is postponed till the development of the main issue WORDSNET-832 is finished. We are continuously work on improving Aspose.Words table layout algorithm, but since MS Word behavior is not documented and not always obvious, it is impossible to give promises regarding this issue. Please accept our apologies for your inconvenience.

Hi, Is there further update here ?

@rnara Unfortunately, there are still no news regarding this issue. The issue is still postponed.