View content mismatch

Hello Team, Please refer to the attached .docx file. The file displays differently when opened in various versions of MS Office. Please advise us on this matter.
Figure_R1.docx (159.2 KB)

@mohamed.sathakathullah It looks like the difference in appearance between MS Office versions is caused by how the figure is built in the document.

The figure consists of 9 separate floating objects (5 pictures and 4 text labels). Each one is anchored to a different empty paragraph and positioned relative to it. Also, the document’s default font is DengXian (等线), which is only included with Office 2016 and later. Older Office versions substitute a different font, which changes the height of those paragraphs — so each picture and label shifts by a different amount, and the figure falls apart.

To make the document look the same everywhere, you can:

  1. Group the figure into a single object - select all pictures and labels and use Group (or insert the finished figure as one image). This is the most reliable fix.
  2. Alternatively, embed the fonts in the file (File → Options → Save → Embed fonts in the file) or use a font available on all machines.

Hello Team,

What steps should I follow to convert a PDF into a format compatible with MS Office using Aspose? Please provide the instructions (specifically regarding Word Java code).

Note: used “doc.getCompatibilityOptions().optimizeFor(MsWordVersion.WORD_2016);” but not expected output.

@mohamed.sathakathullah Aspose.Words for Java does no support conversion from PDF to Word. This feature is supported only in .NET and Python version of Aspose.Words.
Do you use Aspose.PDF to convert PDF to DOCX?