i have problem on save to stream

General TRichView support forum. Please post your questions here
Post Reply
gbg
Posts: 37
Joined: Sun Apr 11, 2010 4:55 pm

i have problem on save to stream

Post by gbg »

hi i have version 13.0.1
when i use : ActiveEditor.RichViewEdit.SaveRVFToStream(memSt,False);
don`t save page size (a4,a5,...) in stream if i change page size before load and load data from memory stream the page size is not Correct size
gbg
Posts: 37
Joined: Sun Apr 11, 2010 4:55 pm

Post by gbg »

sorry
savestream work correctly

but in Demo RichViewActions with Ribbon when i change page size to a5 and save to stream and change page size to a4 then load from stream page size don`t change to a5 :oops:

i change source code and problem solved.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Page size is saved/loaded to RVF if you include rvfoSaveDocProperties and rvfoLoadDocProperties in RichViewEdit.RVFOptions.
However, they are not applied automatically to TRVPrint.
If you want to store a page size with document, then:
- in rvActionNew.OnNew and rvaActionOpen.OnOpenFile, call RVPrint.AssignDocParameters(RichViewEdit.DocParameters)
- in rvActionPageSetup.OnChange, assign properties of RVPrint to RichViewEdit.DocParameters.

(all this work would be made automatically is you use ScaleRichView instead of TRichViewEdit)
Post Reply