Monday, May 14, 2012

ADF : Open pdf file in New window or in Popup using InlineFrame




This is a draft version of ADF sample application for opening PDF file in New Window or Inline Frame.
You can download the code from here / here

Birds eye view of the app:


To Show the contents of the file, we are registering a servlet(ShowPdfServlet)  in web.xml which takes care of reading and displaying .
On the same lines, we can tweak the code to read from data base or any other place.

Application assumes, the existence of file "c:\\webcenter.pdf". Hence before you run the application make sure you place a pdf with above name. (PdfServlet.java : 44 hard coded value says the same)

To open the file in new window, I have followed ADF Code Corner Example (33).


The task flow enabled for url-invoke allowed and it should be bounded taskflow "with pages". More info @ ADF Code Corner Example.

Sample output when opens in popup.




Soon will come out with detailed post.

Thanks.







6 comments:

  1. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

    Alena

    Diverticulitis Treatment Diverticulitis Diet

    ReplyDelete
  2. Even, i have followed the code corner stuff, i am facing issue in CHROME browser, is there a solution for that.

    Iam facing issue as the servelet getting called multiple times, hence the window is shrinking....

    ReplyDelete
  3. When can we expect your detailed post ?

    --Sai Yeluri.

    ReplyDelete
  4. Hi ,

    Can we display similar wat word.xls and gif file also.

    Regards,
    Ramesh

    ReplyDelete
  5. HI Dear,
    I read your post and download the application , but not working ...

    ReplyDelete
  6. Thanks Srinivas for the tutorial on ADF. We create many tutorials as well that may benefit your readers, find out more at http://www.fireboxtraining.com/

    ReplyDelete

Protected by Copyscape Unique Content Check