Free Support Forum - aspose.com

Word to PDF Formatting Errors

Hi, I recently downloaded Aspose.Word and Aspose.PDF yesterday, and did a test where I loaded a Word document and outputted it to PDF. Unfortunately, there are some differences between the way the PDF is rendered that would stop our purchase of the two products. I emailed a sample Word document and a PDF created from that document. Here are the differences that present in the PDF not in the Word document:

+text to the right of the logo is put on a new line rather on the same with the logo
+two tables have a line break between them rather than rendering them side-by-side
+text on top of the table starting with “Ansi____” does not match up properly with the columns on the table below
+line spacing is narrower on the PDF output than on the Word document.
+“Physician’s Examination” text is no longer bolded

Are these known problems? Are there work-arounds? Thx.

Paul Chong

Hi Paul,

Thanks for your interest in Aspose products.

All I can say both Aspose.Word and Aspose.Pdf teams are working hard to make the conversion excellent and it will improve in a matter of weeks.

Currently, the biggest limitation in Aspose.Pdf is that a picture and a table in Aspose.Pdf are considered paragraphs hence they can only appear “alone” and have nothing on their right or left. This explains the first two issues.

If you have control over the document you can restructure it so it is rendered properly:

1. To have a logo and text on the right you just need to create a table with one row and two cells. Put the logo in one cell and the text into the other.

2. To have two tables side by side you again need to create a table with two cells and put your tables into different cells. Nested tables are supported.

For the other issues I will look and report back asap, they might be related to Aspose.Word.

Great, the nested tables did the trick. One curious behavior I found in the Word to PDF export was if there was whitespace with style that was different from the text around it, that whitespace would be much wider than normal. So something like “Aspose Word” would render like “Aspose______Word” (replace the underscore with whitespace). It appears the message board likes to strip out extra whitespace.

Dear Paul,

Thank you for considering Aspose.

I will fix the “wide” whitespace bug soon.


On the subject of formatting errors our Word document templates have fixed height tables in that when passed over to the PDF library end up loosing the fixed height. Has anyone seen this behaviour before? Any suggestions?

Aspose.Pdf does not support row specified row height at the moment. I will post a request to Aspose.Pdf development team.

+text on top of the table starting with “Ansi____” does not match up properly with the columns on the table below

You use tab characters in this line, but Aspose.Pdf does not support tab stops yet and Aspose.Word cannot communicate correct positions of tab stops to Aspose.Pdf.

As a workaround you can create another row on top of that table, divide it into cells as you need and just make it have no border. This way you will be able to aling the text to match the cells in the table below.

----------

+“Physician’s Examination” text is no longer bolded

This seems to be a problem in Aspose.Pdf. I’ve submitted a request to Aspose.Pdf team.

------------

+line spacing is narrower on the PDF output than on the Word document.

Can you please send me the document once again, the one which you are using now with tables for the image and nested tables for two columns. I will look at the line spacing issue closely.



Thanks for looking into those bugs. To clarify, what I meant by line spacing was row height. Towards the end of the document, there were some lines of normal text but the text row height was shorter in the PDF than the Word document.

Dear pchong,

Thank you for considering Aspose.

We are now working on eliminating the difference between Aspose.Word and Aspose.Pdf. We will fix this bugs in early August.

Aspose.Word 1.9 supports default tab stop positions when exporting to PDF.

Does Aspose.Word to Aspose.Pdf support customized tab stops in a paragraph? Any time estimates on this feature?

(I am assume it does not yet since a recent version that I have been evulating does not.)

Only default tab stops are supported when converting from DOC to PDF at the moment. This is a limitation in Aspose.Pdf. I will ask the Aspose.Pdf team to reply here with the estimates.

I will consider this issue when making plan for next release. It hopes to be supported in March.

Thanks for the information — looking forward to seeing this implemented.