Page 2 of 2

Re: loading html to non-empty rve - possible?

Posted: Thu Nov 30, 2017 4:48 pm
by Sergey Tkachenko
Your original code saves HTML in UTF-8 encoding. But HTMLViewer does not understand that it is UTF-8, and loads it in another encoding, so text becomes corrupted.
When we change encoding, HTML is saved in UTF-16 encoding. HTMLViewer detects it, and loads correctly.

When you call HTMLViewer.LoadFromString, pictures are loaded exactly like as if you call methods for loading from a file or string.
But you should specify the correct base path in the parameter of ImportHtmlViewer/AppendHtmlViewer.

If you still want to use files, create them in a temporal directory, not in the application directory, because it can be read-only.