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

Free Support Forum - aspose.com

Images become distorted using pdf.js (firefox) when converting to PDF

Hi,


We are using Aspose.Words v13.5.0.0 to convert .docx-documents to PDF-format. This works as intended, but when opening the converted documents in a web-page using pdf.js or in Firefox, all images within the created PDF-document become unusable (wrong offset and upside down).

When we are using MS Word 2010 to convert the same document to PDF, all images are shown correctly in web-pages using pdf.js and Firefox.

To illustrate the problem, please see the attached documents.
  • Original.docx is the source document with a simple .jpg-image included in the file
  • ConvertedByWord.pdf is the document converted to PDF using MS Word
  • ConvertedByAspose.pdf is the document converted to PDF using Aspose.Words
To replicate the problem, please open both .pdf-files in Mozilla Firefox.

We’ve read that this might have something to do with tiling pattern in the PDF-file created, but this type of pattern is obviously used by Aspose and not MS Word. The PDF-documents created by Aspose are also generally a lot larger than those created by MS Word.

We realize that supporting tiling pattern might be a missing feature in the pdf.js framework used by certain webpages and Firefox, but a fix is still something you should consider when obviously Aspose converts docx-files in a different way than MS Word, resulting in unusable PDF-files for everyone using Firefox.

Can we expect a fix to this problem in Aspose.Words?

Is Aspose.Words configurable so that it is possible to convert docx-files to PDF so that images will be shown correctly in web-pages using pdf.js and Firefox?

Thanks!
Hi Cap,

Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-8393 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Cap,


It is to inform you that our development team has completed the work on the issue (WORDSNET-8393) and has come to a conclusion that this issue and the undesired behaviour you’re observing is actually not a bug in Aspose.Words. So, we’ve closed this issue as ‘Not a Bug’. If we can help you with anything else, please feel free to ask.

We are also experiancing this issue. It wasn’t an issue with v10.0.0 and having upgraded it’s disapointing to find this is still and issue.
Is there anything that can be done with Aspose.Words.Saving.PdfSaveOptions to prevent it?

Hi Stuart,


Thanks for your inquiry. In our DrawingML rendering implementation image is rendered to the APS as texture brush. Texture brush is rendered to the PDF as tiling pattern.

I have logged a new enhancement feature request in our issue tracking system for rendering of DrawingML in PDF file with RGB color formatting. The feature ID is WORDSNET-8433. You will be notified via this forum thread once this feature is available. We apologize for your inconvenience.

Please use the following code snippet as a workaround. Hope this helps you.

Document srcDoc = new Document(MyDir + “in.docx”);<o:p></o:p>

srcDoc.save(MyDir + “Out.doc”, SaveFormat.DOC);<o:p></o:p>

Document doc = new Document(MyDir + “Out.doc”);<o:p></o:p>

doc.save(MyDir + “Out.pdf”, SaveFormat.PDF);


The issues you have found earlier (filed as WORDSNET-8433) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.