Save as docx lost the header and footer(TRichview17/SRichview8)

General TRichView support forum. Please post your questions here
Post Reply
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

Save as docx lost the header and footer(TRichview17/SRichview8)

Post by wolf1860 »

Delphi:10.2
TRichView:17(16.17)
SRichview:8
The save as docx function worked perfect with old version , now lost the header and footer.Everything is ok when displaying in the SrichViewEdit.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Post by Sergey Tkachenko »

I cannot reproduce this problem.
Make sure that rvrtfSaveHeaderFooter is included in SclRView.RTFOptions
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Post by wolf1860 »

I am sure TSclRView.RTFOptions include [rvrtfSaveHeaderFooter], and I am sure my software worked fine before I rebuilt it with the new version.
Thank u!
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Post by Sergey Tkachenko »

Can you reproduce this problem in our demos?
For example, I run ScaleRichView\Demos\ActionTestTabs\ActionTestUni.dproj. When it starts, it loads a file with a normal header. I saved it as DocX, and the header is there. I also loaded an RTF file containing all 6 possible headers and footers, and it was saved as DocX with all of them.

I use TRichView version with some modifications after v16.17, but they must not affect this problem.
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Post by wolf1860 »

I have post my test rvf file to ur gamail. I opened it with the demo application, and exported ,it lost the header and footer too.
By the way,I opened the same file with an older version of the demo ,the exported result is correct!
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Post by Sergey Tkachenko »

I confirm this problem. It will be fixed in the next update.

Quick fix:
Open RichView.pas, find all checks for RTFReaderAssigned and remove them. I.e. search for the substring "RTFReaderAssigned and" and remove it (3 times).
Actually, now you can remove function RTFReaderAssigned: Boolean from TCustomRichView and TRVTableInplaceEdit classes at all.
wolf1860
Posts: 118
Joined: Sat Nov 21, 2015 2:04 am

Re: Save as docx lost the header and footer(TRichview17/SRichview8)

Post by wolf1860 »

Now everything is ok:) Thank u very much!
Post Reply