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

Free Support Forum - aspose.com

Common JavaPDF libs do not render pdfs including jpeg that where created by aspose.words for java

Hi,

we have an issue with the pdfs created by aspose.words for java.
We converted a docx-file into a pdf file. We can view the file in many
PDF viewers (acroreader, preview, foxit, evince, …). Unfortunately,
many pdf java libs (including the viewers) do not render and display
images included in the pdf file. The pdf lib Icepdf is important in our case.
It seems that it ignores the images. But if we convert the docx file to doc
right before we create a pdf, it’s totally fine.
The interesting thing is that we actually send the file to dev null, i.e.
asposeDocument.save(new NullOutputStream(), new DocSaveOptions());

Best
Johannes

Issue:

File wordSourceFile = new File("C://tmp/icepdf-issue.docx");
Document doc = new Document(wordSourceFile.getAbsolutePath());
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.setCompliance(PdfCompliance.PDF\_A\_1\_B);
pdfSaveOptions.setEmbedFullFonts(false);

// Everything works fine if save a doc to dev null
// doc.save(new NullOutputStream(), new DocSaveOptions()); 

File pdfTargetFile = new File("C://tmp//icepdf-issue.pdf"); 
//images wont be recognized by icepdf
doc.save(pdfTargetFile.getAbsolutePath(), pdfSaveOptions);

Hi Johannes,

Thanks for your query. I have tested the scenario and have not found the issue with exported PDF. Please use the latest version of Aspose.Words for .NET 11.0.0. Please find the generated output file in attachment.

aspose.words for .net does not work for us.
We need aspose.words for java.
Anyway, we will check it with the version that has been released yesterday.

Hi Johannes,

Please accept my apology for referring you .NET release. Please download the latest version of Aspose.Words for Java 11.0.0 and let us know, If you face any problem.