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

Free Support Forum - aspose.com

Save to PDF formatting and alignment issue

We have a word file and after processing with aspose API saving the word file in PDF format but there are some discrepancies.

I am uploading two files here word and PDF. You can see there is space between two tables in Word but same space is missing in PDF while using doc.save(“pdffile.pdf”).

Please investigate this. We are using aspose JavaBook Large data (15).pdf (50.8 KB)
Book Large data (14).docx (21.5 KB)

@Abdul_Salam Thank you for reporting the problem to us. For a sake of correction it has been logged as WORDSNET-24213. We will keep you informed and let you know once it is resolved.

JFYI we are using Java library. From your replay seems you are checking for DOTNet.

@Abdul_Salam .NET is the main version of Aspose.Words, Java version is build by auto-porting .NET code to Java. So all fixes made in .NET version are auto-ported to Java version.

Okay thanks for clarification. Is there any timeline to fix this issue?

@Abdul_Salam The issue is currently in a queue for analysis. Once analysis is dome we will be able to provide you more information.

Is there any update??

@Abdul_Salam We have already implemented a draft of the fix. The code is currently in review. If everything goes smoothly the fix will be included into the next version of Aspose.Words.

The issues you have found earlier (filed as WORDSNET-24213) have been fixed in this Aspose.Words for Java 22.10 update also available on Maven.

Updated the package but still same issue.

@Abdul_Salam Could you please attach your output document here for our reference? I have rechecked conversion using the latest 22.11 version of Aspose.Words for Java and the output looks correct: out.pdf (89.0 KB)

Here is example of bASPOSE Table issue.docx (12.2 KB)
ASPOSE Table issue.pdf (35.0 KB)
oth Document word and PDF . Word have space in between but not PDF.

@Abdul_Salam The PDF document you have attached is produced by the old 22.6 version of Aspose.Words for Java. But the problem has been fixed in 22.10 version. So you should update Aspose.Words to 22.10 or newer version.

Ohh Sorry re-uploading with latest version and same issue.ASPOSE Table issue (2).docx (22.5 KB)ASPOSE Table issue (1).pdf (50.1 KB)

@Abdul_Salam As I see the difference between the output on your side and what you see in MS Word appears because the fonts used in the document are not available to the Aspose.Words. In this case Aspose.Words performs font substitution and it is not possible to produce the same document layout as in MS Word. You could try to install Microsoft TrueType fonts package or some replacement fonts to get the better result.

I am using windows mahcine and still issue is there. As per link you provided it should not be a issue with windows.

@Abdul_Salam The problem can occur in any environment if the fonts used in the document are not available. Please try implementing IWarningCallback to get notification when font substitution is performed.