save TDBRichViewEdit configuration

General TRichView support forum. Please post your questions here
Post Reply
aduarteprg
Posts: 5
Joined: Sat Apr 07, 2018 1:49 am

save TDBRichViewEdit configuration

Post by aduarteprg »

good night, friends, I started to study the component a little time I would like some tips. to find out how I can save the page's consigments in the database and load pull the text from the database here an A4 page. the way I'm doing when formatting the system is applying to all pages when I load the text. comes everything page size, alignment and etc. how can I save the settings for each text in the bank and load it from the bank when I bring the text.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: save TDBRichViewEdit configuration

Post by Sergey Tkachenko »

Do you want to store information specified in DBRichView.DocParameters?
aduarteprg
Posts: 5
Joined: Sat Apr 07, 2018 1:49 am

Re: save TDBRichViewEdit configuration

Post by aduarteprg »

Good morning, I'm using the following code.

  rvemain.DocParameters.PageWidth: = 21;
  rvemain.DocParameters.PageHeight: = 29;
  rvemain.DocParameters.LeftMargin: = 2;
  rvemain.DocParameters.RightMargin: = 2;
  rvemain.DocParameters.TopMargin: = 2;
  rvemain.DocParameters.BottomMargin: = 2;
rveMain.Format;

It's still not correct, though.

pagina.png
pagina.png (75.15 KiB) Viewed 14914 times
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: save TDBRichViewEdit configuration

Post by Sergey Tkachenko »

TRichView does not use these properties for printing. They are used only for saving and loading in documents (RVF, RTF, DocX).
For printing, properties of TRVPrint are used (such as margins) and properties of the current printer (such as page size and orientation).

Here is how to store page information in RVF and apply it to TRVPrint (margins) and the current printer (page size):
https://www.trichview.com/forums/viewto ... f=3&t=3196

PS: Consider using ScaleRichView. It includes WYSIWYG editor component TSRichViewEdit, its page properties are automatically applied when printing.
Post Reply