RTF print

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dmitri Shvetsov

    #1

    RTF print

    Hi All,

    Who prints RTF files or streams from C#? Can you give a hint or a good
    advice? How to do it easier?

    Regards,
    Dmitri Shvetsov



  • Dmitri Shvetsov

    #2
    Re: RTF print

    Hi,

    I can't believe that nobody prints here from RTF files. I found an example
    from VS2003, it can load RTF file or a plain text, we can see the formatted
    text in a window, then if we preview or use a printer preview we see a plain
    text, but not the original RTF document with formats, fonts, centered
    strings etc. Cool! Why did Microsoft published this !@# example if it
    doesn't work? They included a simple RTF file in their project and it can be
    loaded, but when I try to load my own file, little bit complicated with
    included URLs the preview rises the exception. What's going on? Is it a
    common problem?

    I could call WinWord from my application lo load and print this document but
    I assume that the client knows nothing about WinWord and even doesn't have
    the Office installed. So, what's the official way to print the formatted RTF
    document from C#?

    Any suggestions, hints, advices are welcome!

    Dmitri Shvetsov
    [color=blue]
    > Hi All,
    >
    > Who prints RTF files or streams from C#? Can you give a hint or a good
    > advice? How to do it easier?[/color]


    Comment

    • Daniel O'Connell

      #3
      Re: RTF print




      "Dmitri Shvetsov" <dshvetsov@cox. net> wrote in message
      news:TGNgb.5727 4$Ms2.16803@fed 1read03...[color=blue]
      > Hi,
      >
      > I can't believe that nobody prints here from RTF files. I found an example
      > from VS2003, it can load RTF file or a plain text, we can see the[/color]
      formatted[color=blue]
      > text in a window, then if we preview or use a printer preview we see a[/color]
      plain[color=blue]
      > text, but not the original RTF document with formats, fonts, centered
      > strings etc. Cool! Why did Microsoft published this !@# example if it
      > doesn't work? They included a simple RTF file in their project and it can[/color]
      be[color=blue]
      > loaded, but when I try to load my own file, little bit complicated with
      > included URLs the preview rises the exception. What's going on? Is it a
      > common problem?
      >
      > I could call WinWord from my application lo load and print this document[/color]
      but[color=blue]
      > I assume that the client knows nothing about WinWord and even doesn't have
      > the Office installed. So, what's the official way to print the formatted[/color]
      RTF[color=blue]
      > document from C#?
      >[/color]
      There is no offical way, however one can make the RichTextBox class print.
      Hopefully this will do what you need:
      http://msdn.microsoft.com/library/de...ichtextbox.asp
      (watch for line wrap)[color=blue]
      > Any suggestions, hints, advices are welcome!
      >
      > Dmitri Shvetsov
      >[color=green]
      > > Hi All,
      > >
      > > Who prints RTF files or streams from C#? Can you give a hint or a good
      > > advice? How to do it easier?[/color]
      >
      >[/color]


      Comment

      Working...