Page 2 of 2

Re: Bad RTF table causing RichView to error

Posted: Wed Jul 23, 2025 9:45 pm
by jgkoehn
One clarification I believed initially this was RTF table related, it is not nothing to do with RTF. I am sorry for that confusion.

Re: Bad RTF table causing RichView to error

Posted: Fri Jul 25, 2025 1:30 pm
by Sergey Tkachenko
The error occurs on drawing a document (not a background), and the only reason I can imagine is desynchronization between the document items and formatting information (the latter is updated when you call Format).

In your code, the most probable reason for this is

Code: Select all

reader.RVData.NormalizeDocument(0,True)
This method may remove some unnecessary document items.
You need to call Format after it, not before.

Re: Bad RTF table causing RichView to error

Posted: Tue Jul 29, 2025 8:24 pm
by jgkoehn
This does seem to work thank you.

Code: Select all

  reader.RVData.NormalizeDocument(0,True);
  reader.format;