How can a Word document with RVofficeConverter in Richview properly loaded.
So far I have done it since the RVOfficeConverter
text, format and images correctly invites (loaded).
But the problem is the header and footer.
How can the header and footer of a Word document using RVOfficeConverter in RichView appear?
Previous examples have until now not really help.
If it is possible to ask a sample code and proper integration into a unit.
Many thanks in advance.
Best Regards
Jmich
MS Worddocument *.doc and RVofficeConverter
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
The converters convert file (doc in this case) to RTF. Then this RTF is loaded by TRichView.
There are 2 places where headers may disappear:
1) when converters convert file to RTF
2) when TRichView loads this RTF.
If headers lost on the first step, it is impossible to fix it. If on the second step, we can try to solve this problem.
How to find it out? We need to look at RTF generated by the converter.
Instead of calling converter.ImportRV, call conveter.ImportRTF to load RTF in converter.Stream. Then save to file (by calling MemoryStream.CopyFrom(converter.Stream, 0), and send this file to me.
There are 2 places where headers may disappear:
1) when converters convert file to RTF
2) when TRichView loads this RTF.
If headers lost on the first step, it is impossible to fix it. If on the second step, we can try to solve this problem.
How to find it out? We need to look at RTF generated by the converter.
Instead of calling converter.ImportRV, call conveter.ImportRTF to load RTF in converter.Stream. Then save to file (by calling MemoryStream.CopyFrom(converter.Stream, 0), and send this file to me.
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Sorry for the delay.
The situation may be different depending on which version of Office is installed. I tested with MS Office 2007.
MS Office 2007 saves headers and footers differently from previous versions of MS Word. TRichView cannot read headers and footers saved by MS Office 2007 yet, and in my test the converter saved headers and footers in MS Office 2007's way.
I changed TRichView so that it can read them. It will be uploaded in the next update. If you need it urgently, I can set it by e-mail.
If you have previous version of MS Office, the problem may be in another place...
The situation may be different depending on which version of Office is installed. I tested with MS Office 2007.
MS Office 2007 saves headers and footers differently from previous versions of MS Word. TRichView cannot read headers and footers saved by MS Office 2007 yet, and in my test the converter saved headers and footers in MS Office 2007's way.
I changed TRichView so that it can read them. It will be uploaded in the next update. If you need it urgently, I can set it by e-mail.
If you have previous version of MS Office, the problem may be in another place...
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17521
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: