how to embed a pdf file into a JSF page

Discussion in 'Java' started by Ankur, Nov 2, 2006.

  1. Ankur

    Ankur Guest

    i had a pdf file which i want to be embedded into a JSF (jsp)File. how
    can i do this.

    thankx in advance
    Ankur, Nov 2, 2006
    #1
    1. Advertising

  2. Kroll, Michael, Nov 2, 2006
    #2
    1. Advertising

  3. Ankur

    Diego Guest

    Ankur ha scritto:
    > i had a pdf file which i want to be embedded into a JSF (jsp)File. how
    > can i do this.
    >
    > thankx in advance
    >


    If you have to generate a pdf from scratch you can look at iText or at
    Apache FOP.

    Otherwise, you can open your file as a stream of byte and write it to
    the response output stream. Remember to set the content length with the
    lenght of the byte[] array and the content type to application/pdf type.

    I don't have an example code at hand, so I hope it helps anyway!

    bye!
    Diego, Nov 2, 2006
    #3
    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. dudu
    Replies:
    0
    Views:
    371
  2. Sebastian Fey

    JSF debugging / JSF newsgroup

    Sebastian Fey, Apr 7, 2006, in forum: Java
    Replies:
    1
    Views:
    7,622
    Danno
    Apr 7, 2006
  3. BlackIce
    Replies:
    1
    Views:
    17,162
  4. Ricardo Pog
    Replies:
    1
    Views:
    415
    Austin Ziegler
    Mar 26, 2008
  5. L Ng
    Replies:
    1
    Views:
    984
    Roedy Green
    Dec 2, 2012
Loading...

Share This Page