 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ToniG Guest
|
Posted: Thu Jun 17, 2004 9:17 am Post subject: richedit problem with papersize |
|
|
Hi,
i have a problme with the richedit component of delphi.
I have a reference RTF file, that I create in Windword.
In this file, I set the page to A4, and also set the margins.
Now when I just do a
Richedit1.Lines.Loadfromfile...
and
Richedit1.Lines.Savetofile...
The original Papersize and margins are lost.
Opening the RTF file again in Word give a PaperSize of "Letter", and other
margins then original defined.
Any ideas why ?
Thanks for any hints.
Toni
|
|
| Back to top |
|
 |
Peter Below (TeamB) Guest
|
Posted: Thu Jun 17, 2004 7:18 pm Post subject: Re: richedit problem with papersize |
|
|
In article <40d16212$2 (AT) newsgroups (DOT) borland.com>, ToniG wrote:
| Quote: | i have a problme with the richedit component of delphi.
|
No, you have one with the rich edit common control in Windows <g>.
| Quote: | I have a reference RTF file, that I create in Windword.
In this file, I set the page to A4, and also set the margins.
Now when I just do a
Richedit1.Lines.Loadfromfile...
and
Richedit1.Lines.Savetofile...
The original Papersize and margins are lost.
Opening the RTF file again in Word give a PaperSize of "Letter", and other
margins then original defined.
Any ideas why ?
|
That is simply the nature of the beast. The rich edit common control only
understands a subset (a rather limited one) of the full RTF specs, which is
basically defined by the capabilities of latest MS Word version. If it
encounters any tags in a RTF file that it does not know how to handle the
control tends to just filter them out, so when you save the result again all
these unsupported tags are gone.
This depends a bit on the version of the rich edit control used, by the way.
Version 3 can not only handle more tags than version 1, it is also better at
preserving tags it does not know how to handle. Unfortunately TRichedit is a
wrapper around version 1, but there are alternatives that use version 2 or 3
when it is present on the users system (it lives in a different DLL than
version 1). The JEDI VCL contains such a richedit class.
There are also more fully featured word-processor control in the 3rd-party
market, e.g.
WPTools http://www.wptools.com
Arsenal Word Processor Toolkit (www.arssoft.com)
TRichview http://www.trichview.com
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|