TadvRichEditor - formatting problems

Hello there ,
I am trying to use TDBAdvRicheditor but i have alot of problems with it.
When i am trying to paste or open from file .rtf documents written in wordpad, it messes up format,
sometimes changes font in certain parts of documents, changes font size and so on,
here are examples, the same file

1. Original wordpad:



"Vanilla" TRichEdit Shipped with Rad Studio (kind of OK, after setting margins pretty good) :


And finally TAdvRichEdit ( The whole formatting is messed up, hard to set up page properly) :


How to fix this ?
It's compiled on Win 7 Professional with C++ Builder XE6 but also on RAD studio 10.2 ( tadvrichedit Demo project) and it shows weird results on win7, win8, and win10 as well.

kind regards



Also when i tried to add tricheditFormatToolbar to regular RichEdit, i am getting:

"The png image could not be loaded from resource ID"

and full context:


[501618AB]{rtl200.bpl  } System.Classes.Error (Line 9074, "System.Classes.pas" + 5) + $28
[50161902]{rtl200.bpl  } System.Classes.TResourceStream.Initialize (Line 9079, "System.Classes.pas" + 2) + $1
[501617C5]{rtl200.bpl  } System.Classes.TResourceStream.Create (Line 9053, "System.Classes.pas" + 2) + $10
[0035579D]{vclimg200.bpl} Vcl.Imaging.pngimage.TPngImage.LoadFromResourceName (Line 5018, "Vcl.Imaging.pngimage.pas" + 2) + $1A
[25CD42B5]{TMSDXE6.bpl } Advtoolbarext.TCustomAdvToolBar.AddButton + $E1
[25CD89A1]{TMSDXE6.bpl } Advtoolbarrichedit.TRichEditEditToolBar + $51
[21D4E267]{delphicoreide200.bpl} CompPalMgr.TComponentPalettePageItemDelegate.CreateComponent (Line 2756, "CompPalMgr.pas" + 2) + $7
[21140F75]{designide200.bpl} ComponentDesigner.TComponentRoot.DoCreateComponent (Line 2440, "ComponentDesigner.pas" + 25) + $17
[21146B96]{designide200.bpl} ComponentDesigner.TComponentRoot.CreateCurrentComponent (Line 4619, "ComponentDesigner.pas" + 2) + $32
[21162036]{designide200.bpl} Surface.TDesignSurface.CreateItem (Line 196, "Surface.pas" + 1) + $11
[21111D9A]{designide200.bpl} Designer.TDesigner.DoDragCreate (Line 795, "Designer.pas" + 1) + $F
[21112648]{designide200.bpl} Designer.TDesigner.DragEnd (Line 975, "Designer.pas" + 19) + $3
[21114C88]{designide200.bpl} Designer.TDesigner.MouseUp (Line 1764, "Designer.pas" + 1) + $2
[51FBEF52]{vcldesigner200.bpl} VCLSurface.MouseEvent (Line 3187, "VCLSurface.pas" + 45) + $11
[5005FA37]{rtl200.bpl  } System.TMonitor.Exit (Line 17352, "System.pas" + 2) + $7
[51FBFB3F]{vcldesigner200.bpl} VCLSurface.TVclDesignSurface.IsDesignMsg (Line 3448, "VCLSurface.pas" + 48) + $6
[5064230B]{vcl200.bpl  } Vcl.Forms.TApplication.WndProc (Line 9920, "Vcl.Forms.pas" + 98) + $B
[5005F02A]{rtl200.bpl  } System.@IsClass (Line 16068, "System.pas" + 1) + $8
[504F285B]{vcl200.bpl  } Vcl.Controls.TControl.WndProc (Line 7145, "Vcl.Controls.pas" + 4) + $21
[504F6E23]{vcl200.bpl  } Vcl.Controls.TWinControl.IsControlMouseMsg (Line 9815, "Vcl.Controls.pas" + 1) + $9
[504F75ED]{vcl200.bpl  } Vcl.Controls.TWinControl.WndProc (Line 10047, "Vcl.Controls.pas" + 153) + $6
[50639980]{vcl200.bpl  } Vcl.Forms.TCustomForm.WndProc (Line 4426, "Vcl.Forms.pas" + 206) + $5
[51FC8677]{vcldesigner200.bpl} VCLFormContainer.TControlSizer.ControlWndProc (Line 313, "VCLFormContainer.pas" + 33) + $C
[504F6C34]{vcl200.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9759, "Vcl.Controls.pas" + 3) + $6
[501766E4]{rtl200.bpl  } System.Classes.StdWndProc (Line 17064, "System.Classes.pas" + 6) + $1
[50642F1F]{vcl200.bpl  } Vcl.Forms.TApplication.ProcessMessage (Line 10351, "Vcl.Forms.pas" + 23) + $1
[50642F62]{vcl200.bpl  } Vcl.Forms.TApplication.HandleMessage (Line 10381, "Vcl.Forms.pas" + 1) + $4
[50643295]{vcl200.bpl  } Vcl.Forms.TApplication.Run (Line 10519, "Vcl.Forms.pas" + 26) + $3

  1. Can you please provide the problematic RTF code you try to paste in the TDBAdvRichEditor so that we can inspect this here?

    2) We're investigating a solution for this. In the mean time, please add the unit AdvToolBarRes to the uses list for the unit where you want to use the control and create the control via code.




Sure, here You are:
http://www.portal.ceron.pl/Pics/ProblematicFile.rtf

I've created "mini editor" for internal use with application i am working on, to
make it independent from MS Word , it demands .rtf files or direct editing
but my testers just used documents previously written in MS word and saved as .rtf
(various agreements and other documents allready present at their accounting office).
As You can see, effects are really bad.
Also when i use TDBAdvRichEdit, when i FIRST time save larger document as the one i linked,
it takes lot of time to process it ( on I7 4790k Processor and 16 Gigs of ram it takes up to minute).
Every other time when i open it and load/save from/to DB it's instant.


We support at this moment not all possible MS Word features as MS Word adds a lot of custom RTF tags. We've opened the docoument with Wordpad and see that also Wordpad fails to load this document.
We will investigate this what (within reasonability) we can do to improve the import of this document.