Any suggestions ?
Anna
Anna
"Anna" <An...@notvalid.nospam> wrote in message
news:OXsm3jtk...@TK2MSFTNGP06.phx.gbl...
It may not have been answered because it really is not a C# question.
The RTF Specification and how to set the page size and orientation are
here: http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx.
Look for a section called "page information".
--
Mike
Sorry�didn't notice your question earlier. That said, it's not really a
C# or .NET question, so your ability to get useful advice here is limited.
The settings you're talking about � paper size and orientation � are
printer settings, not document attributes. Many programs do in fact
save printer settings with their document files, but AFAIK this isn't
inherent in the RTF format.
It's possible that RTF defines a way to escape arbitrary kinds of data.
In which case, depending on how you're accessing the printer settings
themselves, you may be able to store the specific data in the RTF
document. But such data would still only be specifically accessible by
your application; lacking a specification for storing that data, no
other application would understand it.
All of the above is with respect to printer settings generally (which
include far more than just the paper size and orientation). However,
looking at the RTF specification, it appears that there is support for
those two specific settings.
The "\pszN" control word allows you to define paper sizes (I don't know
the specific value you need to use for N to get A4, but you should be
able to look that up as easily as I could), and you can use "\landscape"
to change the document default to landscape, or the "\lndscpsxn" control
word to have a specific section within the document be specified as
landscape.
Keep in mind, however, that you might have to track these properties
independently of the RichTextBox control. Those properties aren't going
to be useful to the control itself, and if it does any sort of parsing
or filtering on RTF when the text for the control is set, it might just
discard those control words if it sees them.
Pete
Anna
"Peter Duniho" <no.pet...@no.nwlink.spam.com> wrote in message
news:esw9%23nHlK...@TK2MSFTNGP05.phx.gbl...
> Anna wrote:
>> "Anna" <An...@notvalid.nospam> wrote in message
>> news:OXsm3jtk...@TK2MSFTNGP06.phx.gbl...
>>> I'r like to save my RTF-file (text frommy RichTextBox) in A4 format and
>>> landscape.
>>> Saving as RTF-file isn't the problem, but can't find any solution to add
>>> some information for A4 and landscape.
>>> The intention is that when a user opens the RTF-file using Ms Word, the
>>> page is in A4 format and in landcape.
>>>
>>> Any suggestions ?
>>
>> anyone ?
>
> Sorry�didn't notice your question earlier. That said, it's not really a
> C# or .NET question, so your ability to get useful advice here is limited.
>
> The settings you're talking about � paper size and orientation � are