Word document with frames is not getting converted properly to PDF

I am using aspose-words-14.10.0-jdk16 component for converting my Word documents to PDF files.

Document doc = new Document(FilePath);
doc.save(resultStr, com.aspose.words.SaveFormat.PDF);

pdf is not the same as the doc.

Hi Leb,

Thanks for your inquiry. I have tested the scenario and have found that the position of text ‘Objet : Attestation enfant à charge’ is changed in output Pdf file. Please check the attached image for detail. I have not found any other issue in output Pdf file.

For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11145. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Leb,

Thanks for your patience. It
is to update you that our development team has completed the
analysis of your issue (WORDSNET-11145) and has come to a conclusion that this issue has
been closed with ‘‘Won’t Fix’’ resolution.
I am quoting the developers comments here for your reference.

The issue occurs because Aspose.Words does not reproduce some peculiarities in MS Word behaviour observed in compatibility mode.

In the attached simplified document, there are two frames. The first frame ends with a table. The table ends with a row that has no borders. There is not enough vertical space for the text to be placed between the frames. However, there is some space to the right of the second frame. Aspose.Words puts the wrapped text there. MS Word doesn’t.
Why MS Word does not use the space to the right of the second frame, is not clear. If a border is specified for the last table row in the first frame, MS Word uses this space. The only difference between the attached simple.docx and simple.border.docx is a border around the last table row in the first frame. Yet MS Word uses the space to the right of the second frame in simple.border.docx and does not use it in simple.docx.

If the document is re-saved without maintaining compatibility via MS Word, the space to the right of the second frame is also used.

When experimenting, I met with even more peculiar behaviour of MS Word in simple.duplicated paragraph.docx. In this document, the paragraph before the second frame (“Magic paragraph”) is rendered twice in MS Word. It is rather weird that when one of them is edited in MS Word, the text in the second one changes as well. The issue is preserved in print preview, but looks differently on exporting from MS Word to Pdf.

So the whole thing looks like an area where MS Word logic is strange and fuzzy, at least. With duplicated paragraph, it seems that there is a bug in MS Word somewhere in this area.

As a workaround of this issue, please set the wrapping type of the problematic frame to ‘None’ using MS Word.

hi tahir
We tried to transform the .doc into .docx format by code and manually, but when transforming to pdf we got the same design error.
Concerning your proposed workaround "As a workaround of this issue, please set the wrapping type of the problematic frame to 'None' using MS Word." can it be done by code using aspose?

Hi Leb,

Thanks
for your inquiry. Unfortunately, currently text frames are not fully
supported by Aspose.Words and you can not change “Text Wrapping” setting
for Frames by using Aspose.Words. Please manually set the text wrapping of frame using MS Word.

We
already logged this feature request as WORDSNET-9294 in our issue
tracking system. You will be notified via this forum thread once this
feature is available. We apologize for your inconvenience.