Free Support Forum - aspose.com

Images disappearing when converting to pdf

Hi Team,
I have 2 images in a word document. When I convert to pdf one of the images doesn’t appear and it leaves an empty space instead.

The only difference I have found is in the xml of the images.
(Working)
<wp:inline distT=“0” distB=“0” distL=“0” distR=“0” wp14:anchorId=“64684F13” wp14:editId=“10AE6B97”>
(Not working)
<wp:inline distT=“0” distB=“0” distL=“0” distR=“0”>

Here is the code I am using:

   Document doc = new Document(input);
    //Force the word document to convert to a4 size so FOIA page is the same size
    SectionCollection sec = doc.getSections();
    for( int i = 0; i<sec.getCount(); i ++)
    {
        sec.get(i).getPageSetup().setPaperSize(PaperSize.A4);
    }
    doc.updateFields();
    doc.updatePageLayout();

    String out_fname = this.mktemppdf();
    doc.save(out_fname, SaveFormat.PDF);

@jshields3_baml_com,

Thanks for your inquiry. Please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.