Attempt to reduce space

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
Tavo
Posts: 152
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

Attempt to reduce space

Post by Tavo »

Hi there!!
I recently acquired a ScaleRichView license and have already begun to replace (in my application) all TRichViewEdit by TSRichviewEdit. I'm happy with the change.
My application to store RichView format documents in a database (MSSQL). When editing documents I allow the display of Header and Footer but these subdocuments are not saved within the document. So my new editor (SRichViewEdit) I run this before saving the contents to the field

Code: Select all

   Self.Editor.SRichViewEdit1.SubDocuments[srvhftFirstPageHeader].Clear ;   Self.Editor.SRichViewEdit1.SubDocuments[srvhftEvenPagesHeader].Clear ;
   Self.Editor.SRichViewEdit1.SubDocuments[srvhftNormalHeader].Clear ;
   Self.Editor.SRichViewEdit1.SubDocuments[srvhftFirstPageFooter].Clear ;
   Self.Editor.SRichViewEdit1.SubDocuments[srvhftEvenPagesFooter].Clear ;
   Self.Editor.SRichViewEdit1.SubDocuments[srvhftNormalFooter].Clear ;
It works well. However there is a slight difference causes me doubt: I´ve insert a document that contains only the text "Hello" with my old TRichViewEdit
Then I measure the length (in bytes) of the text with the following query

Code: Select all

select Datalength(CRTextCart) from DocsTable where......
I get...

374

Then I edit with the new TS RichView-based editor, then do the BD Post
I get

604

Both controls have this values in RVFOptions

RVFOptions = [rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveDocProperties, rvfoLoadDocProperties]

Try to find what are the differences in the stored data, I believe I have found that also. You may not be able to see the correct characters but I think it exemplifies

With TRichViewEdit

Code: Select all

-8 1 3
-9 1 0 0 0 0 9
1
-9 2 0 0 2 0 1
Style
2   	StyleNameNormal textFontNameArialSize
  -9 2 0 0 2 0 2
Style
L   	StyleNameParagraph StyleBorder.WidthBorder.InternalWidthTabs   -9 2 0 0 2 0 4
Style
    -9 7 0 0 0 0 7
Units=2
PageHeight=297
PageWidth=210
LeftMargin=15
RightMargin=15
TopMargin=20
BottomMargin=20
0 1 0 0 0 0
Hello
With TSRichViewEdit

Code: Select all

-8 1 3
-9 2 0 0 2 0 10

    -9 2 0 0 2 0 1

2   	StyleNameNormal textFontNameArialSize
  -9 2 0 0 2 0 2

Z   	StyleNameParagraph StyleTabs 
ModifiedPropsrvpiLineSpacingrvpiLineSpacingType   -9 2 0 0 2 0 4

    -9 7 0 0 0 0 7
Units=2
PageHeight=297
PageWidth=210
LeftMargin=15
RightMargin=15
TopMargin=20
BottomMargin=20
-9 2 0 0 2 0 8
[b]headerf
    -9 2 0 0 2 0 8
headerr
    -9 2 0 0 2 0 8
header
    -9 2 0 0 2 0 8
footerf
    -9 2 0 0 2 0 8
footerf
    -9 2 0 0 2 0 8
footer
    -9 2 0 0 2 0 3[/b]

!          9   9   L   L   ¨  ¨   0 1 0 0 0 0
Hello

I would like to minimize the space occupied. There is some information that can provide me on ways to reduce the storage space?
Tavo
Posts: 152
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

Post by Tavo »

I made the mistake of assigning bold text I wanted to show, that's why you see and
Thanks for readme and sorry for my bad english
Tavo
Posts: 152
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

Post by Tavo »

It's me again :D :D I try to improve my text. Or provide alternative text :D :D
¿TScaleRichView stores more bytes TRichView or am I doing something wrong ?.
I would like to use now TScaleRichView to continue recording the same documents with the same size as before.
My idea is to keep the outside (in other tables) storing the headers, footers and backgrounds.
It is that my application stores many documents, and they take up space. Any reduction of the occupied space will be important.
Thanks for readme.
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Currently, the only way is assigning:

Code: Select all

SRV.PageProperties.HeaderVisible := False;
SRV.PageProperties.FooterVisible := False;
before saving, and restore them after.
Tavo
Posts: 152
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

Post by Tavo »

It works!!
Thanks Sergey
Salute!
Post Reply