Generating a pdf document is giving skewed output


#1

Hi Team,

I am trying to generate a simple pdf document which contains some tables and text. Sometimes the output pdf has completely/partially skewed text. Weirdly, sometimes even if there is just a single line of text or just a single word, I am still getting the skewed output. However, the equivalent word document always has correct output which is not skewed. I have to admit that this issue is ocurring very rarely and really hard to reproduce and that’s why I won’t be able to provide any definite steps or sample code which you can use to replicate it consistently. I am using Aspose.Words 19.7 jar.

Have you ever witnessed any such issue before with pdf documents ? If yes, could you please provide a hint about what could be going wrong here ?
(I have placed a sample pdf and equivalent doc file in the attached zip) skewedOutputs.zip (19.6 KB)


#2

@shubhampandey

We have converted the shared DOC file to PDF using the latest version of Aspose.Words for Java 19.9 and have not found the shared issue. So, please use Aspose.Words for Java 19.9.


#3

@tahir.manzoor
Thanks for your prompt response. Could you please confirm through your testing if the issue exists in 19.7 ? If so, then what should be the course of action ? We just upgraded to 19.7 and again upgrading to 19.9 so soon is not an option.
Thanks !


#4

@tahir.manzoor
Or if you can tell me whether this kind of skewed output is even possible in Aspose through some setting then that would also be really helpful ?


#5

@shubhampandey,

Please make sure that you had attached the correct Word document (“skewed_output.doc”) here for testing; because we are unable to reproduce this issue on our end even when using old Aspose.Words for Java version 19.7 on Windows 10. Please see the PDF files that we generated on our end by using 19.9 and 19.7 versions of Aspose.Words by using the following simple code:

Code:

Document doc = new Document("E:\\skewedOutputs\\skewed_output.doc");
doc.save("E:\\skewedOutputs\\awjava-19.7.pdf");

Can you please also share your OS and JDK versions and any other environment details which will help us to reproduce the same problem on our end? Also, are you using the
Aspose.Words for Java 19.7 (JDK1.6 jar only) version or the regular JAR from Aspose.Words for Java 19.7 package?


#6

@awais.hafeez
OS - Windows 10
JRE - IBM JRE version 7, 64 bit
We are using the regular JAR downloaded from -

https://downloads.aspose.com/words/java/new-releases/aspose.words-for-java-19.7/


#7

@shubhampandey,

I am afraid, we are still unable to reproduce this issue on our end. Can you please confirm that you had provided the correct input Word document i.e. ‘skewed_output.doc’ (the ‘skewed_output.pdf’ is generated from)? Do you see skewed PDF output when converting this ‘skewed_output.doc’ to PDF on your end? Can you please also provide piece of source code to be able to reproduce the same problem on our end?

Unfortunately, we do not know how can Aspose.Words produce such a skewed output from this ‘skewed_output.doc’.