contenttype rtf question

Discussion in 'ASP .Net' started by sonic, Jan 14, 2005.

  1. sonic

    sonic Guest

    Hi,
    I am able to display my document with contenttype="applicaton/msword"
    this requires that the content be marked up in html style..

    i wanted to also try displaying it as RTF, so i could use \rtf1 \par
    style formatting in it.

    however when i do
    contenttype applicaton/rtf
    and attempt to insert rtf markup, the browser/ word does not recognize
    it as valid RT and makes me choose different format.
     
    sonic, Jan 14, 2005
    #1
    1. Advertising

  2. sonic

    sonic Guest

    here is my code:

    Response.AddHeader("Content-Disposition",
    "inline;filename=InvoiceContent.doc");
    Response.ContentType = "application/rtf";

    content.Append( @"\rtf1" );
    content.Append( @"\ansi
    \deff4\deflang1033{\fonttbl{\f4\froman\fcharset0\fprq2 Baskerville
    MT;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
    " );
    ....
     
    sonic, Jan 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MJ
    Replies:
    3
    Views:
    6,513
  2. alien2_51

    Response.ContentType

    alien2_51, Jun 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    759
    alien2_51
    Jun 26, 2003
  3. Bill
    Replies:
    0
    Views:
    383
  4. Larry Neylon
    Replies:
    5
    Views:
    1,191
    Larry Neylon
    Jul 23, 2009
  5. Tony
    Replies:
    2
    Views:
    294
Loading...

Share This Page