IE6 and sending PDF

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gregor Rot

    IE6 and sending PDF

    Hi, i am sending a pdf file to IE6 and just want the browser to open it
    directly without asking anything.

    This doesn't work:

    Content-type: application/pdf
    Content-length: size_of_file
    Content-Disposition: attachment; filename=somefi le.pdf

    then i send the data.

    This results in: the browser asking to save or open the file, and it
    works fine.

    Now, according to documentation, if i remove the Content-disposition,
    the browser should open it directly in the frame. Anyone been doing that
    with success?

    tnx,
    Greg

  • John Dunlop

    #2
    Re: IE6 and sending PDF

    Gregor Rot wrote:
    [color=blue]
    > Hi, i am sending a pdf file to IE6 and just want the browser to open it
    > directly without asking anything.[/color]

    Then configure your sorry excuse for a browser to do that. Try
    searching the archives of the microsoft.* hierarchy if you can't
    figure it out.
    [color=blue]
    > [...] Now, according to documentation, if i remove the Content-
    > disposition, the browser should open it directly in the frame.[/color]

    I sincerely doubt that any documentation would say that. What
    documentation are you talking about? The Manual? RFC1806? RFC2616-
    conforming software needn't follow Content-Disposition header
    suggestions.

    You might of course use the inline disposition type (RFC1806, sec.
    2.1). That's no guarantee of anything though.

    --
    Jock

    Comment

    • Gregor Rot

      #3
      Re: IE6 and sending PDF

      John Dunlop wrote:
      [color=blue]
      > Gregor Rot wrote:
      >
      >[color=green]
      >>Hi, i am sending a pdf file to IE6 and just want the browser to open it
      >>directly without asking anything.[/color]
      >
      >
      > Then configure your sorry excuse for a browser to do that. Try
      > searching the archives of the microsoft.* hierarchy if you can't
      > figure it out.
      >
      >[color=green]
      >>[...] Now, according to documentation, if i remove the Content-
      >>disposition , the browser should open it directly in the frame.[/color]
      >
      >
      > I sincerely doubt that any documentation would say that. What
      > documentation are you talking about? The Manual? RFC1806? RFC2616-
      > conforming software needn't follow Content-Disposition header
      > suggestions.
      >
      > You might of course use the inline disposition type (RFC1806, sec.
      > 2.1). That's no guarantee of anything though.
      >[/color]
      Take it easy - i am correcting myself - without Disposition, the browser
      should take the default action (either opening the pdf in a separate
      Acrobat instance or loading the ActiveX console inside the browser.
      [color=blue][color=green]
      >> Content-type: application/pdf
      >> Content-length: size_of_file
      >> Content-Disposition: attachment; filename=somefi le.pdf[/color][/color]

      With this code, i get a dialog from IE, "Save", "Open", by clicking Open
      the PDF is opened in a new Acrobat instance, i want it to be opened in
      the browser. How can i do that?

      Comment

      • Farhan

        #4
        Re: IE6 and sending PDF

        Gregor Rot <zara4tustra@ya hoo.com> wrote in message news:<dhWNb.161 8$%x4.280409@ne ws.siol.net>...[color=blue]
        > Hi, i am sending a pdf file to IE6 and just want the browser to open it
        > directly without asking anything.
        >
        > This doesn't work:
        >
        > Content-type: application/pdf
        > Content-length: size_of_file
        > Content-Disposition: attachment; filename=somefi le.pdf
        >
        > then i send the data.
        >
        > This results in: the browser asking to save or open the file, and it
        > works fine.
        >
        > Now, according to documentation, if i remove the Content-disposition,
        > the browser should open it directly in the frame. Anyone been doing that
        > with success?
        >[/color]

        Content-Disposition: inline; filename=somefi le.pdf[color=blue]
        > tnx,
        > Greg[/color]

        Comment

        • Gregor Rot

          #5
          Re: IE6 and sending PDF

          Farhan wrote:
          [color=blue]
          > Gregor Rot <zara4tustra@ya hoo.com> wrote in message news:<dhWNb.161 8$%x4.280409@ne ws.siol.net>...
          >[color=green]
          >>Hi, i am sending a pdf file to IE6 and just want the browser to open it
          >>directly without asking anything.
          >>
          >>This doesn't work:
          >>
          >>Content-type: application/pdf
          >>Content-length: size_of_file
          >>Content-Disposition: attachment; filename=somefi le.pdf
          >>
          >>then i send the data.
          >>
          >>This results in: the browser asking to save or open the file, and it
          >>works fine.
          >>
          >>Now, according to documentation, if i remove the Content-disposition,
          >>the browser should open it directly in the frame. Anyone been doing that
          >>with success?
          >>[/color]
          >
          >
          > Content-Disposition: inline; filename=somefi le.pdf
          >[color=green]
          >>tnx,
          >>Greg[/color][/color]

          I have resolved the problem:
          [color=blue][color=green][color=darkred]
          >>> Content-Disposition: attachment; filename=somefi le.pdf[/color][/color][/color]

          By changing the upper line to:
          [color=blue][color=green][color=darkred]
          >>> Content-Disposition: filename=somefi le.pdf[/color][/color][/color]

          (omitting the "attachment "), IE takes the default behaviour and opens
          the PDF within the browser (loading the ActiveX of Acrobat).

          Greg

          Comment

          • John Dunlop

            #6
            Re: IE6 and sending PDF

            Gregor Rot wrote:
            [color=blue]
            > I have resolved the problem:[/color]

            The real problem was with your "browser", not how you serve the file.
            Configure it to behave as you wish.
            [color=blue][color=green][color=darkred]
            > >>> Content-Disposition: filename=somefi le.pdf[/color][/color][/color]

            That is a malformed Content-Disposition header according to RFC1806
            sec. 2 (and RFC1506, sec. 4). A disposition type, or extension-token
            is required.

            --
            Jock

            Comment

            • John Dunlop

              #7
              Re: IE6 and sending PDF

              John Dunlop wrote:
              [color=blue]
              > That is a malformed Content-Disposition header according to RFC1806
              > sec. 2 (and RFC1506, sec. 4).[/color]
              -----------------^^^^
              That should be RFC1521. Oops.

              --
              Jock

              Comment

              • Gregor Rot

                #8
                Re: IE6 and sending PDF

                John Dunlop wrote:
                [color=blue]
                > Gregor Rot wrote:
                >
                >[color=green]
                >>I have resolved the problem:[/color]
                >
                >
                > The real problem was with your "browser", not how you serve the file.
                > Configure it to behave as you wish.
                >
                >[color=green][color=darkred]
                >> >>> Content-Disposition: filename=somefi le.pdf[/color][/color]
                >
                >
                > That is a malformed Content-Disposition header according to RFC1806
                > sec. 2 (and RFC1506, sec. 4). A disposition type, or extension-token
                > is required.
                >[/color]

                Well you are wrong somewhere, because if i point my browser to a regular
                pdf file on a site, IE opens it within the browser.

                If i serve the file over the described php program, i get a dialog
                (Open, Save, etc, and Open opens a new Acrobat instance), all that
                assuming: "Content-Disposition: attachment; filename=somefi le.pdf"
                ^^^^^^^^^^^

                So i don't have any problem with my browser setup, it's a disposition
                problem. If "attachment " is written, the browser treats the data as "an
                attachment", and automatically offers the dialog Open, Save, etc...

                Seeing your knowledge of the RFCs and all I would be very happy if you
                could write the correct disposition for the desidered behaviour (sending
                a pdf, and making IE behave like receiving a regular pdf file, opening
                it within the browser - this is the default IE setup after Acrobat
                Reader is installed = an ActiveX control is installed and opened
                automatically after clicking on a pdf file on a site, opening the file
                in the ActiveX control, loaded in the browser).

                tnx,
                Greg

                Comment

                • Agelmar

                  #9
                  Re: IE6 and sending PDF

                  Gregor Rot wrote:
                  <snip>[color=blue]
                  > Seeing your knowledge of the RFCs and all I would be very happy if you
                  > could write the correct disposition for the desidered behaviour[/color]
                  <snip>

                  Can you not read? He's already posted it 5 times in this thread.
                  Content-Disposition: inline; filename=somefi le.pdf

                  you cannot just say content-disposition: filename=someth ing, you have to
                  specify thedisposition! inline is what you want, and he posted that multiple
                  times.


                  Comment

                  • Gregor Rot

                    #10
                    Re: IE6 and sending PDF

                    Agelmar wrote:
                    [color=blue]
                    > Gregor Rot wrote:
                    > <snip>
                    >[color=green]
                    >>Seeing your knowledge of the RFCs and all I would be very happy if you
                    >>could write the correct disposition for the desidered behaviour[/color]
                    >
                    > <snip>
                    >
                    > Can you not read? He's already posted it 5 times in this thread.
                    > Content-Disposition: inline; filename=somefi le.pdf
                    >
                    > you cannot just say content-disposition: filename=someth ing, you have to
                    > specify thedisposition! inline is what you want, and he posted that multiple
                    > times.
                    >
                    >[/color]
                    Uh sorry, i see, it was mentioned in the first post, not many times,
                    tnx. It works.

                    Greg

                    Comment

                    Working...