Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] Embedding PDF in an HTML

Expand Messages
  • Chris Bowditch
    ... You can change whether or not the PDF viewer opens in a separate browser window or is opened in the same HTML page by setting content-disposition in the
    Message 1 of 3 , Aug 1 3:25 PM
    • 0 Attachment
      >From: "vvelu" <vvelu@...>
      >
      >Folks:
      >
      >Embedding a PDF in an HTML page (rather than launching it in a
      >separate window) is possible by using the <embed> tag. However, this
      >needs a PDF file to be stored on the server side and the URL must
      >point to that file. Is there a way to avoid storing a file? As the
      >FOP creates the PDF, can it be streamed directly to the embedded to
      >the HTML page in which it is embedded.
      >

      You can change whether or not the PDF viewer opens in a separate browser
      window or is opened in the same HTML page by setting content-disposition in
      the servlet response header to;

      attachment will cause PDF to be opened in a separate browser window,
      inline will cause PDF to be shown in same HTML page.

      This was discussed recently on the fop user mailing list, here is the link
      to the thread;

      http://marc.theaimsgroup.com/?l=fop-user&m=105910022220465&w=2

      HTH,

      Chris

      Chris

      _________________________________________________________________
      Express yourself with cool emoticons - download MSN Messenger today!
      http://www.msn.co.uk/messenger
    • dennis_joel_david
      At least, I know how it can be done using ASP or ASP.NET. This C# code snippet outputs a raw byte stream to the browser window, using ASP.NET. private void
      Message 2 of 3 , Aug 4 12:58 AM
      • 0 Attachment
        At least, I know how it can be done using ASP or ASP.NET.

        This C# code snippet outputs a raw byte stream to the browser
        window, using ASP.NET.

        private void Page_Load ( object sender, EventArgs args )
        {
        Response.Clear();
        Response.ClearContent();
        Response.ContentType = "application/pdf";
        byte [] buffer = SomeFunctionToRetrieveTheByteArray();
        Response.BinaryWrite(buffer);
        Response.Flush();
        buffer = null;
        }



        --- In XSL-FO@yahoogroups.com, "vvelu" <vvelu@y...> wrote:
        > Folks:
        >
        > Embedding a PDF in an HTML page (rather than launching it in a
        > separate window) is possible by using the <embed> tag. However,
        this
        > needs a PDF file to be stored on the server side and the URL must
        > point to that file. Is there a way to avoid storing a file? As
        the
        > FOP creates the PDF, can it be streamed directly to the embedded
        to
        > the HTML page in which it is embedded.
        >
        > Your help will be greatly appreciated.
        >
        > Thanks
        > Sam Velu
      Your message has been successfully submitted and would be delivered to recipients shortly.