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);