SaveRVF as PureText (no Symbols)

General TRichView support forum. Please post your questions here
Post Reply
joelcuyos
Posts: 4
Joined: Mon Nov 04, 2013 9:08 pm

SaveRVF as PureText (no Symbols)

Post by joelcuyos »

Hi,

I am trying to save the document to a file in RVF format and below is the options:
[rvfoSavePicturesBody, rvfoSaveBinary, rvfoSaveControlsBody, rvfoSaveBack, rvfoLoadBack, rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveLayout, rvfoLoadLayout, rvfoSaveDocProperties, rvfoLoadDocProperties]

I noticed that some parts of the document contains some symbols which prevent me from parsing the whole document intelligently. The document contains VCL components in which I need to parse the property of these components on the RVF file.

Is there something I need to do (or change) such that the component properties is readable from another application? BTW, I am currently using v1.9.32.2

Kind regards,
Joel
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can exclude rvfoSaveBinary
joelcuyos
Posts: 4
Joined: Mon Nov 04, 2013 9:08 pm

Post by joelcuyos »

Thanks Sergey. I already tried that, but it generates the VCL properties in binary (HEX).

I can go as far as changing the source code (if it needs to), just tell where should I start looking at.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, now I do not understand your question.
Can you explain with more details?
joelcuyos
Posts: 4
Joined: Mon Nov 04, 2013 9:08 pm

Post by joelcuyos »

Sorry for not explaining more in details. English is not my primary language.

We currently have documents (RVF formatted) and these documents contain VCL controls with some properties like caption, background color, etc.

Now, we are developing another application (that is not delphi-based) that needs to read/parse these RVF formatted document. Opening these documents in Notepad, I see/read the property names of the components. However, the values that are associated with these properties are in ASCII symbols.

Now, I am asking if there is an option in RVE to turn these ASCII values into a human readable values, like clTeal - for the background color property, 'First Component' for the caption property, etc.

If there is no option available for this, I can work on the source code and make changes from there. I just need to know which file(s) would I be working on.

KR,
Joel
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The only way to extract values of properties is
1) to parse RVF first and extract data of controls
2) parse control data to extract properties

RVF specification is here:
http://www.trichview.com/help/rvf_specification.html
Control data are saved and loaded using RVFSaveControlBinary, RVFLoadControlBinary (RVFMisc.pas).
You can add ObjectBinaryToText and ObjectTextToBinary there. But actually, I think parsing binary data is simpler than text.
joelcuyos
Posts: 4
Joined: Mon Nov 04, 2013 9:08 pm

Post by joelcuyos »

Thanks Sergey for pointing me the right direction. I will look at the file that you mentioned and see what I can do.
Post Reply