Hi,
We are experiencing an issue where the pdf rendition differs from the word view / print
We are experiencing that an image is displaced to the previous page.
Please find attached:
- a screenshot comparing the Word and PDF renditions
- The original MS Word document
- The PDF rendition as generated by us
We use the following code with Aspose Words for Java version 17.11
@Test
public void displacedImagesTest() throws Exception {
LicenseHelper.getLicenseHelper(); // loads the license files
Class klass = Document.class;
URL location = klass.getResource('/' + klass.getName().replace('.', '/') + ".class");
System.out.println("The document class is located here :" + location.getPath()); // confirms we are using 17.11
Document doc = new Document("target/test-classes/imagedisplacement.docx");
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.getOutlineOptions().setHeadingsOutlineLevels(9);
pdfSaveOptions.setCompliance(PdfCompliance.PDF_A_1_B);
doc.save("target/test-classes/work/imagedisplacement.pdf", pdfSaveOptions);
}
imagedisplacement.zip (678.8 KB)
Thanks