Hello! I have encountered one issue regarding the conversion of an RTF file(OriginalFile.rtf) to DOCX via the Aspose.Words online converter(AsposeConverted.docx). After conversion via Aspose.Words, the internal DOCX structure contains framePr elements in paragraphs via styles, which makes them text frames. Word, in turn, does not make such conversions(WordConverted.docx). Which leads to some problems.
Can you please look into this issue?
AsposeConverted.7z (123,9 КБ)
AsposeConverted.7z (124 KB)
@Kerzet Could you please elaborate the problem in more details? As I can see DOCX produced by Aspose.Words looks closer to the original RTF document, while DOCX produced by MS Word has slight differences with the original RTF.
We are trying to achieve as close compatibility with Word as possible for further display of the document in our software. And the presence of Text Frames complicates the parsing process, since they do not actually perform the function of Text Frames. Is it possible to do something about this, or is there a reason for their presence?
@Kerzet Most likely text frames are present in the produced DOCX because they are present in the source RTF document. but I do not se any text frames in the documents you have attached above.
For example. Files extracted from AsposeConverted.docx: styles.xml file contains
and document contains
therefore style converts this paragraph into Text Frame.
But this is an interesting case, because Word itself does not pay attention to them and does not interpret them as Text Frames, and shows them as plain text.
@Kerzet Thank you for additional information. There is \wrapdefault
property in RTF style definition:
{\s32\ql
\li0\ri0\widctlpar\wrapdefault\hyphpar0\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\rtlch\fcs1
\af0\afs24\alang1025
\ltrch\fcs0
\fs24\lang1049\langfe1025\cgrid\langnp1049\langfenp1025
\snext32
\sqformat
\spriority1
\styrsid7290078
No Spacing;}
It is written to DOCX style definition as:
<w:framePr w:wrap="auto" />
For some reason MS Word does not write the property that is explicitly set in the original RTF. I am afraid currently there is no way to reset this property via public Aspose.Words API. I logged a feature request WORDSNET-27682 to add FrameFormat.ClearFormatting()
to reset all frame related formatting. Also I logged a task to investigate whether we should mimic MS Word behavior and omit writing frame properties with default values.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-27682,WORDSNET-27683
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.