I am using Aspose to convert an RTF file to PDF/Word, but I’m facing an issue with the output formatting. Specifically, the generated Document is missing spaces after styled text such as bold and strikethrough.
Sample RTF Text:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033
{
\fonttbl
{
\f0\fnil\fcharset0 Arial;
\f1\fnil\fcharset2 Symbol;
}
{
\colortbl ;\red255\green0\blue0;
}
}
\viewkind4\uc1\pard\f0\fs20
Just a test package - but has a pretty elaborate descriptions (also to check formatting)
\par
\pard
{\pntext\f1\'B7\tab}
{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}\fi-360\li360 here a bullet list
\par
{\pntext\f1\'B7\tab}
and with \i italic \i0 and \b bold\b0 and
\par
{\pntext\f1\'B7\tab}
\strike striked\strike0 text
\par
{\pntext\f1\'B7\tab}
and in \cf1 red \cf0 text
\par
\pard
\par
And to have some longer text: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo \ul dolore\ulnone s et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo \ul dolore\ulnone s et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\par
}
Result from Aspose Document Generation:
Expected Result:
You can check aspose generated document where space is missing after bold and striked text.
You can check same behaviour on below aspose links :
Issue Description: After converting the above RTF text to PDF/Word using Aspose, the output PDF/Word does not retain spaces after styled text like bold, italic, and strikethrough. This results in a document that does not match the original formatting specified in the RTF.
Question: How can I ensure that spaces are preserved correctly after styled text when converting RTF to PDF/Word using Aspose? Are there specific settings or considerations I should be aware of to achieve the expected formatting?
Any insights or solutions would be greatly appreciated!