how to View pdf file in browser in CF 7

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default how to View pdf file in browser in CF 7

    Hello,

    Has any one know hoe to view pdf contents in Browser when user click a link or button using CF 7?

    Please advise.....

    Thanks,
    Anitha
    anikanch Guest

  2. Similar Questions and Discussions

    1. How ti view frameset in ie browser
      Hi. I'm having difficulties to view my mainpage (frameset) in ie browser after put my pages in web server, last time it was OK when I just view and...
    2. Difficulty with View in Browser
      I am developing an ASP.NET form. I have a database connection on a remote web server. When I attempt to view my page in a browser, an interactive...
    3. How to view frame in browser
      Hi.. I need help how to view dreamweaver frame in browser, i just created a frame but when i view in IE browser, error msg display page cannot be...
    4. View link URL in IE6 Browser
      "DanAyo" webforumsuser@macromedia.com wrote: Is the question that you presently can't see the URLs and wonder how that is? Without knowing if...
    5. Can't use browser to view Fireworks
      I am using Fireworks 4.0 and system 10. When I view the browser inside the application, I get a "file not found." message with Explorer 5.0. I tried...
  3. #2

    Default Re: how to View pdf file in browser in CF 7

    Are you talking about cfdocument and flash pages?

    If you're talking about viewing an actual PDF document in the browser, that's
    totally dependent on the user's setup. If they have acrobat reader installed,
    and a web browser that supports viewing PDF docs inside the browser, then that
    will be the default behavior. There's nothing you can do on the server side to
    force this (though there are ways to force them to save the PDF before viewing
    it, and disabling the opening of the PDF in the browser).

    Kronin555 Guest

  4. #3

    Default Re: how to View pdf file in browser in CF 7

    Thanks Kronin555 .

    I use cfdocument to create a pdf file and using a link to open the same or
    any other pdf files. I am using cfcontent to display the file but it hangs.
    link directly to pdf works fine though, cane display using cfcontent in the
    first place?

    Thanks,
    Anitha

    anikanch Guest

  5. #4

    Default Re: how to View pdf file in browser in CF 7

    anikanch,

    I use the following code to display a pdf via cfcontent:

    <cfheader name="Content-Disposition" value="inline; filename=report.pdf">
    <cfheader name="Expires" value="#Now()#">
    <cfcontent type="application/pdf" file="#PDFGenWebRoot#/#filename#.pdf">

    You're obviously going to want to change the file path and filename, and
    possibly remove the Expires header. Post back if you have any problems using
    this.

    Kronin555 Guest

  6. #5

    Default Re: how to View pdf file in browser in CF 7

    I did use cfcontent but it displayes junk characters instead of acutal content in pdf. Please help.

    Thanks.


    anikanch Guest

  7. #6

    Default Re: how to View pdf file in browser in CF 7

    You're doing something funky then, because the code I posted works fine.

    Post the code you're using.
    Kronin555 Guest

  8. #7

    Default Re: how to View pdf file in browser in CF 7

    Read this thread:-
    [url]http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=3&threadid=990412&forumid=1[/url]
    Stressed_Simon Guest

  9. #8

    Default Re: how to View pdf file in browser in CF 7

    Thanks a lot for your help and time, Kronin555 .

    It works now, for some reason It didn't work with the same code you
    provided(may be while copying some thing more was mising), while playing around
    the code I had removed below line. After seeing you reply I added below line
    and it works fine now. Thanks..........

    <cfheader name="Expires" value="#Now()#">

    --A
    --Anitha

    anikanch Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139