Hi Aspose Support. We currently use Aspose.Word 20.2 to generate PDF documents and are looking to achieve accessibility (i.e. PdfCompliance.PdfUa1) on these documents. We have tried newer versions of Aspose.Word that do support PdfUa1, but they cause the documents to render differently.
Since we work with thousands of document templates (Word docs containing merge tags, many of which get merged with “HTML” text), if we upgrade to a newer version of Aspose.Word it will be a challenge to have the document templates (or HTML text) adjusted manually to match the rendering of version 20.2.
So, we were wondering if there was any way to get PdfUa1 in Aspose.Word 20.2? Alternatively, is there any way to use a newer version of Aspose.Word that has PdfUa1 and also supports backwards compatible rendering (similar to how it looks in 20.2)?
@tndeveloper
In Aspose.Words version 20.2, support for PDF/UA-1 compliance (PdfCompliance.PdfUa1) is limited, and there is no option to enable this compliance in that version. To achieve PDF/UA-1 compliance, it is recommended to upgrade to a newer version of Aspose.Words, as subsequent releases have enhanced support for various PDF standards, including PDF/UA-1.
If maintaining rendering consistency with version 20.2 is essential, it is advisable to conduct thorough testing with the newer version to identify any discrepancies. You may need to adjust your document templates or HTML content accordingly to minimize rendering differences while taking advantage of the improved PDF compliance features.
For further details on PDF compliance and updates, please consult the official Aspose documentation.
@tndeveloper Could you please attach the problematic input and output documents here for testing? We will check the rendering differences on our side and provide you more information.
No, unfortunately, this version of Aspose.Words does not support PdfUa1 compliance.
Most likely, the difference is caused by improvements made during 5 years of the product evolving. Anyways it is hard to answer for sure without your actual documents.
@alexey.noskov Here are the source document and outputs (We do some post processing e.g. the Sample watermark)
Source.DOCX (30.3 KB)
Document with 25_9 version.PDF (132.9 KB)
Document with 20_2 version.pdf (132.9 KB)
@tndeveloper Thank you for additional information. As I can see PDF produced by Aspose.Words on my side looks exactly the same as PDF produced by MS Word.
Aspose.Words: out.pdf (119.8 KB)
MS Word: ms.pdf (220.8 KB)
Do you perform some preprocessing of the document before conversion? As I can see the output PDF produced on my side is closer to Document with 20_2 version.pdf
you have provided.
For testing I used the following simple code:
Document doc = new Document(@"C:\Temp\in.docx");
doc.Save(@"C:\Temp\out.pdf");
Apologies, the sample we provided named with 25_9 was actually misnamed and produced by a different version of Aspose. We retested using Aspose 25.9 and got the same result as you.
We do not do any preprocessing before the conversion. We call the Document.Save() method to save as a docx then call Save() again to save as a PDF.
One thing we noticed is that the file named with 20_2 actually does have a difference on page 3 where the last paragraph shows as 4 lines. In version 25.9 it contains only 3 lines and the next line wraps to the next page.
Here is another document where we see differences, and we would like to know if anything can be done in version 25.9 or later that would allow producing a result similar to version 20.2:
Test 2 - The line spacing in the top section (table) is completely different between Aspose versions, and the start of the second column also differs. Various tables also have different line spacing as well between different Aspose versions.
Source:
Artifact ITD.DOCX (24.3 KB)
Aspose v25.9:
ITD with 25_9 version.PDF (113.9 KB)
Aspose v20.2:
ITD with 20_2 version.pdf (112.8 KB)
@tndeveloper Thank you for additional information. I see the difference in the PDF documents you have provided. But if compare PDF produced by Aspose.Words with PDF produced with MS Word on my side they look the same.
Aspose.Words: out.pdf (110.4 KB)
MS Word: ms.pdf (188.0 KB)
So the new version produces more correct result than the older version.
The development goal of the Aspose.Words Document Layout Engine is to make it as close to MS Word as possible, rather than maintaining the same rendering results as older versions of Aspose.Words. This means that differences in document layout may occur between older and newer versions due to continuous improvements in the layout engine.
Sorry for the delayed response.
Thanks Alexey. We will review these results
1 Like