Hi,
keepn.zip (23.6 KB)
We are having the following problem when we use Aspose.Words for .NET (V.20.8) to load RTF files and eventually save them into DOCX documents:
Suppose the RTF document contains three paragraphs, the first and third of which have the \keepn tag (which means they should be kept together with the following paragraph), the second, however, has \keepn0 (in order to switch off keeping together). Each paragraph starts with a \pard tag. The relevant part of the RTF file is,
\pard\s0\keepn{\plain This is paragraph 1.\par}
\pard\s0\keepn0{\plain This is paragraph 2.\par}
\pard\s0\keepn{\plain This is paragraph 3.\par}
You can see this in the ‘Simple_keepn.rtf’ file in the attached ZIP file.
If we create a new Aspose.Words.Document object with this RTF file and save it to some DOCX file immediately afterwards, we can see that in the resulting DOCX file all three paragraphs have “Keep with next paragraph” switched ON.
If we leave out \keepn0 in the second paragraph, everything works fine. Aspose seems to ignore the “0” part and always set the property to “true”. By the way, the same problem appears with the \keep tag.
In the attached ZIP archive, please find the following files:
– This description
– Sample RTF document ‘Simple_keepn.rtf’
– Sample project ‘TestRtfKeep’ including ‘TestRtfKeep.docx’
– Document ‘Simple_keepn.docx’ created from ‘Simple_keepn.rtf’ using ‘TestRtfKeep.docx’
Our questions:
- Do you consider this behavior a bug in current versions of Aspose.Words for .NET?
- If so, in which release will this bug be fixed?
Thank you very much for your cooperation.
Best regards,