Superfluous \par directives in RTF ????
Posted: Wed Sep 05, 2012 10:11 pm
Using TRichView V13.5 with Delphi XE2, all service packs.
My program has the TRichView editor from one of your demo programs integrated and called by double-clicking on the field of a grid.
When, in the editor, I type a single line of text: "just a test", and save it, the generated RTF code is as follows:
{\rtf1\ansi\ansicpg1252\deff0\deflang3082{\fonttbl{\f0\fnil\fcharset0 tahoma;}{\f1\fnil\fcharset0 Tahoma;}}
\viewkind4\uc1\pard\lang0\f0\fs16 Just a test\par
\pard\lang3082\f1\par
}
This would appear to have some extra superfluous \par or \pard directives, if I am not mistaken ???
The problem becomes visible if you try to print this RTF using FastReport V4.11.17. The single-line band on the report, which is tall enough to show the text with no problems, actually stretches the band, adding white space below the text, because of the extra \par or \pard directive(s).
Is there a way to solve this problem ?
With a multi-line text: Line A
Line B
Line C
the generated RTF text is:
{\rtf1\ansi\ansicpg1252\deff0\deflang3082{\fonttbl{\f0\fnil\fcharset0 tahoma;}{\f1\fnil\fcharset0 Tahoma;}}
\viewkind4\uc1\pard\lang0\f0\fs16 Line A\par
Line B\par
Line C\par
\pard\lang3082\f1\par
}
All suggestions welcome.
Thanks
Jim Fleming
My program has the TRichView editor from one of your demo programs integrated and called by double-clicking on the field of a grid.
When, in the editor, I type a single line of text: "just a test", and save it, the generated RTF code is as follows:
{\rtf1\ansi\ansicpg1252\deff0\deflang3082{\fonttbl{\f0\fnil\fcharset0 tahoma;}{\f1\fnil\fcharset0 Tahoma;}}
\viewkind4\uc1\pard\lang0\f0\fs16 Just a test\par
\pard\lang3082\f1\par
}
This would appear to have some extra superfluous \par or \pard directives, if I am not mistaken ???
The problem becomes visible if you try to print this RTF using FastReport V4.11.17. The single-line band on the report, which is tall enough to show the text with no problems, actually stretches the band, adding white space below the text, because of the extra \par or \pard directive(s).
Is there a way to solve this problem ?
With a multi-line text: Line A
Line B
Line C
the generated RTF text is:
{\rtf1\ansi\ansicpg1252\deff0\deflang3082{\fonttbl{\f0\fnil\fcharset0 tahoma;}{\f1\fnil\fcharset0 Tahoma;}}
\viewkind4\uc1\pard\lang0\f0\fs16 Line A\par
Line B\par
Line C\par
\pard\lang3082\f1\par
}
All suggestions welcome.
Thanks
Jim Fleming