I am trying to output an RTF file with mixed page orientations. I have been following your example and have run into a problem that I cannot solve. I use the following statement:
rv->AddNL ("\\pgwsxn12240\\pghsxn15840", 1, 0);
What I see in RichViewEdit is "\pgwsxn12240\pghsxn15840" (this has become part of the displayed text) and the output RTF file contains two backslashes in front of each parameter (exactly as the literal string). If I change the double backslash to a single backslash, the RichViewEdit display is the same only without the slashes (they are removed) and the corresponding output to the RTF file is missing all backslashes.
The question is, how do I insert text with backslashes in C++?
Emitting backslashes in C++
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 86
- Joined: Mon Jun 08, 2009 11:25 pm
I got it to work thanks.
It does not appear that I can unconditionally add the RTF codes to the text when building the text. The desire would be to have one set of RichView text that can be both displayed and exported. In the display mode, the RTF codes would have to suppressed, but when exporting the RTF codes would be included. I can understand the issues associated with this.
I will write code that knows the type of output (display or RTF) so that it will know whether to add the RTF codes or not.
It does not appear that I can unconditionally add the RTF codes to the text when building the text. The desire would be to have one set of RichView text that can be both displayed and exported. In the display mode, the RTF codes would have to suppressed, but when exporting the RTF codes would be included. I can understand the issues associated with this.
I will write code that knows the type of output (display or RTF) so that it will know whether to add the RTF codes or not.
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Currently, hidden text is not supported, so all text is visible.
There is an alternative solution to using text with RTF codes: using components + OnSaveComponentToFile event.
Example can be found here:
http://www.trichview.com/forums/viewtopic.php?t=2742
There is an alternative solution to using text with RTF codes: using components + OnSaveComponentToFile event.
Example can be found here:
http://www.trichview.com/forums/viewtopic.php?t=2742