Word for Java 17.11 Image displaced to overlap with footer

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

@Docbyte

Thank you for your inquiry. We have investigated this scenario using your provided documents and found the output PDF results are same as your input DOCX document. However we have also observed that the image is already placed in your DOCX document page # 2 near footer and same in output PDF document.

Please download Document-Results.zip (1.0 MB) for these scenarios.

  • Original DOCX with image on page # 2 and output PDF with same layout.
  • Updated DOCX by moving Image from page # 2 to Page # 3 on top of page and output PDF is also same as expected.