Adress frame in word xml doc not correctly converted to PDF

Hello,
in the attached zip file is a xml based word document. this document has a adress frame in the right side of the document.
when this document is converted to pdf (doc.Save(xmlDoc, SaveFormat.AsposePdf):wink:
the adress frame is place alone in the begining of the document, instead of along side the text in the document. This can be seen in the attached Pdf document.

Is there a solution for this ?

regards
martin

Hello Martin,

I couldn’t find the Word file in the Zip file that you have
attached. Please check the attachment or share the code snippet that you are
using to generate the word file and then converting it into Pdf file, so that
we can test the issue at our end.

correct file attached

Hello Martin,

I’ve tested the
scenario and I am able to notice the same issue. We are looking into the
details of this matter and will keep you updated with the status of correction.
We apologize for your inconvenience.

Dear Martin,

Thanks for your inquiry. I have tested it and found that the issue is in Aspose.Words. Something is wrong in the intermediate xml file generated by Aspose.Words. I am moving this thread to aspose words’ forum so that they have the chance to look into it.

Best regards.

Hi

Thanks for your request. I managed to reproduce the problem and created new issue #6966 in our defect database. I will notify you as soon as it is fixed.

As a workaround you can refactor your document. I think it better to use table in your case instead frame.

Best regards.

Hello!

Thank you for considering Aspose. Here is some clarification. Text frames are suggested obsolete in MS Word. They are also quite tricky to handle them well. The better solution is using text boxes instead. Please consider this workaround. Issue #6966 is a duplicate of #1517. I’ll close it and re-link your thread to the original known issue.

Regards,

Hello
Can the convertion from frame to text box be done using Aspose ?
Or does the workaround with text boxes apply to the creation of the original Word document ?

If it’s Possible to do with Aspose, can you post an example ?

regards
Martin

Hi Martin,

Thanks for your request. Unfortunately there is no way to convert frames to textboxes using Aspose.Words. You should to that manually using MS Word.

Best regards.

Hi,
I’ve managed to locate the reason for the failed pdf convertion my self.
In my case it seems, when using styles the framePr is not properly read from the style in the w:docPr section of the XML file.

If for example the following is added in the paragraph in the frame, the result is as expected

<wx:pBdrGroup>
<wx:apo>
<wx:width wx:val=“1983” xmlns:wx=“http://schemas.microsoft.com/office/word/2003/auxHint” />
<wx:height wx:val=“5954” xmlns:wx=“http://schemas.microsoft.com/office/word/2003/auxHint” />
<wx:jc wx:val=“left”/>
</wx:apo>
<w:pPr>
<w:framePr w:w=“1985” w:h=“5954” w:h-rule=“exact” w:wrap=“around” w:vanchor=“page” w:hanchor=“page” w:x=“9527” w:y=“5104” w:anchor-lock=“on” xmlns:w=“http://schemas.microsoft.com/office/word/2003/wordml” />
<w:shd w:val=“solid” w:color=“FFFFFF” w:fill=“FFFFFF” wx:bgcolor=“FFFFFF” xmlns:wx=“http://schemas.microsoft.com/office/word/2003/auxHint” xmlns:w=“http://schemas.microsoft.com/office/word/2003/wordml” />
</w:pPr>
</wx:pBdrGroup>
</wx:apo>

Hope U can use this information

Regards
Martin

Hi

Thank you for additional information. We will further investigate the issue.

Best regards.

The issues you have found earlier (filed as 6966) have been fixed in this update.