Page 1 of 1

Page size and marging saving RTF

Posted: Wed May 09, 2007 1:09 pm
by jma
I'm adding support for saving a list of addresses as a RTF doc.
However, when the RFT gets saved I get "Letter" as page size and margins I dont like.
This application is not supposed to print or even show the data on screen so I dont have a TRVPrint and create the TRichViewEdit using code.

How can I set the page size and margins I want in the RTF file ??

/Martin

Posted: Wed May 09, 2007 6:11 pm
by Sergey Tkachenko
TRichView does not save page sizes and margins, so Word uses defaults when loading.
See here how to save additional information in RTF: http://www.trichview.com/forums/viewtopic.php?t=64
For paper size, the keywords are:
- paper width: \paperwN
- paper height: \paperhN
where N is size in twips (convert mm to twips as it's shown in the link above)