Embed pdf as part of jsf page

hi,
i want to embed a pdf as part of a jsf page.
any suggestions how to do this?

You can use the HTML <iframe> or <object> elements for this.

Similar Messages

  • Embed pdf in website, show one page at a time, with forward and back controls?

    Hi,
    Not sure if this is possible (or if this is the right place to ask), but I need to take a multiple page pdf, embed it in a website so its on the left half of the screen, have it only show one page at a time, and have the forward and back page controls.
    Is this possible, and if so, could someone point me in the right direction?

    Typically you would save it to a JPeg and post those on the web site. Expecting a PDF to show up depends on the client computer configuration and browser. This is too risky, unless you don't mind getting nasty little notes that it does not work. If you do it with JPegs, then all the browsers I know of can handle it. Then simply put the PDF separately for those who prefer to download the PDF and look at it separately.

  • How to invoke "j_security_check" in jsf page

    Hi,
    with ADF security configure in Jdeveloper11.1.1.2, it automatically generate login.html and error.html for form authentication.
    I found in login.html, the action for form is "j_security_check", and I try to customize login page with jsf page, but don't know how to invoke "j_security_check" in jsf page, there is no more action attribute within af:form and I cannot find the "j_security_check" in commandButton action Expression Build.
    Thanks in advanced.
    Best Regards,
    Bill

    Hi,
    you will have to add the login form to the JSf page wrapped in f:verbatim so it shows as part ofthe JSF page. In JSF 1.2 using f:verbatim shoucl not be require, but by experience, better is.
    If you develop and deploy on WLS, then chapter 30 of the Fusion Developer Guide has a god solution for you to build a login form in JSF completely
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/adding_security.htm#BABDEICH
    This does not require j_security_check at all
    Frank

  • ADF: Including a PDF document as part of a page

    Hi,
    I know this subject has been raised in some form or another a couple of times before, so apologies in advance for that. That being said, I've yet to see a solution I can actually use.
    I'm building an application that deals with scanned documents stored in a database. The documents are stored as PDF files i a BLOB column, and during the scanning process varying information has been extracted from the documents (depending on the document type - for instance order numbers or policy numbers). The extracted information is also stored in the database. The application is supposed to work as a sort of post office, in the sense that each document can be sent on to a specific person or group of persons. Before sending the documents on, the users of the application have the option of making manual corrections to the extracted document information. And for this last bit, it is necessary for the users to be able to see the documents (the PDF files).
    What I would like is a page with a master-detail layout, the master being the list of documents and the detail being the extracted document information AND a view of the PDF file. I would like the PDF file to be embedded in the page itself (on the right half of the page for instance), rather than just having a link to the file. So, does anyone have a suggestion to how I should go about achieving this?
    For now, I would settle for a solution where the PDF files themselves are stored in the file system rather than the database (the database then containing only the LOCATION of the files) if that makes it any easier. At some point I would like not to have to depend on the file system for storage of the pdf files, though.
    Regards,
    Andreas

    A search of the forum (or google if you like this better) get you this:
    Embed PDF
    Timo

  • Can JSF page content convert to PDF?

    I want to develop a jsf page that when user click a button can display a pdf file that contain the jsf page content. I know using iText can generate pdf but what i read the example in the iText homepage all is like adding the line by line using document.add() or paragragh , anyway can do it ?

    I adding this code in a servlet
    Document document = new Document();
         document.setPageSize(PageSize.A4.rotate());
         OutputStream out1 = response.getOutputStream();
         response.addHeader("Content-Type", "application/pdf");
         response.addHeader("Content-Disposition", "attachment; filename=\"Test.pdf\"");
              try {
                   URL yahoo = new URL("http://localhost:8080/Test/HelloWorld.faces");
                   URLConnection yc = yahoo.openConnection();
                   BufferedReader in = new BufferedReader(
                   new InputStreamReader(
                   yc.getInputStream()));
              PdfWriter.getInstance(document, out1);
              HtmlParser.parse(document, yc.getInputStream());
              catch (Exception e) {
              System.out.println("error="+e);
              e.printStackTrace();
    But i save the file, the file canot open the error message is either not a supported file or file damaged

  • How to display a JSF page inside center part of panel of another page?

    How can I display a second JSF page inside my center part of Stretch layout in my First page on click of a commandImageLink of First JSF page? Can anyone help me in this with some example?

    Here is a tutorial that will introduce you to the concepts of taskflows, page fragments and regions - http://www.oracle.com/technology/obe/obe11jdev/ps1/boundedtaskflow/bounded_task_flow.html

  • Convert JSF Page to PDF

    i need to convert a JSF Page into a PDF Document .
    any ideas how to do that?

    SACHINLINUX wrote:
    BalusC wrote:
    Why are you hijacking other's topic and acting like you're the topic starter? You're rude.Mr Balu. kindly tell the solution if you have instead of dictating rules. As far as rudeness concern i never seen a person rude like you.
    Sachin KokchaMr Sachin Mr. BalusC is tellign right thing it is not your topic as well as you are telling that you have only one login name. So no need to act like the topic starter.
    Every forum has it's own rules so please kindly obey these rules.
    Gantu

  • Problem with opening PDF files from JSF page using SDO

    Hi all,
    I'm new with JSF and was attempting to read a PDF file from a Database using SDO and JSF. The code below throws an exception when casting from DataObject to Blob. The getLcDoc() method was created by WSAD when I dragged an SDO relational record onto the JSF page. This method returns an DataObject type which I tried casting to a Blob type before using it further. However, an exception is thrown.
    Any feedback is appreciated.
    Arv
    try {
                   FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   Blob file= (Blob)getLcDoc().get("ATTACH");
                   int iLength = (int)(file.length());
                   response.setHeader("Content-type", "application/pdf");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   response.setContentLength(iLength);
                   ServletOutputStream os = response.getOutputStream();
                   InputStream in = null;
                   in = file.getBinaryStream();
                   byte buff[] = new byte[1024];
                   while (true) {
                   int i = in.read(buff);
                   if (i<0) break;
                   os.write(buff,0,i);
                   os.flush();
                   os.close();
         } catch(Exception ex){
              System.out.println("Error while reading file : " + ex.getMessage());
         }

    Hi...I found out that there is actually no need to use a Blob object at all. You can simply call the OutputStreams write() method and pass the DataObject.getBytes() method that returns a byte[] array. The revised code is shown at the end of this posting.
    However, a few other teething problems exist:
    1. This works well only if I specify the content type in response.setHeader() method. What if my users upload different types of files, is there a way that the browser opens according to the file type without setting the content type?
    2. I still have a problem opening PDF files, even if I specify - response.setHeader("Content-type", "application/pdf");
    I get the message - The file is damaged and could not be repaired
    3. I would also like this to open the attachment in a new window and using target="_blank" doesn't seem to work as seen below:
    <h:commandLink
                                                 styleClass="commandLink" id="link1" action="#{pc_DocumentDetailsRead.doLink1Action}" target="_blank">
                                                 <h:outputText id="text5" styleClass="outputText"
                                                      value="Click Here"></h:outputText>
                                            </h:commandLink>
    ------------------------Revised code-----------------------------------------
    FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   response.setHeader("Content-type", "application/msword");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   ServletOutputStream os = response.getOutputStream();
                   os.write(getLcDoc().getBytes("ATTACH"));
                   os.flush();
                   os.close();

  • Creating a pdf file of datatable from Jsf page

    Hi ,
    I want to prepare a pdf file of a data table and store at some system loaction from a Jsf page. How can this be acheived? Any example would be a great help.
    Thanks,

    hi here this adress http://displaytag.homeip.net/displaytag-examples-1.1/example-export.jsp with display tag you can export import your datatable to excel or pdf format.

  • How do I copy different parts of the page into separate pdf files?

    I have Adobe Acrobat 9 Pro and an assortment of very large pdfs that I want to make into about a thousand individual pdfs.  The pages contain text and I want to be able to copy parts of the page into separate different pdfs.  It would be really nice if I could split up the page into the required sections by highlighting all the different sections on the page and then save each section to individual pdfs all at once.  Acrobat has so many features that I am hoping that it can do something like this.  Thanks  Anewbie282

    With the number of pages you are talking about, there is no real easy solution. However, try extracting the page(s) you want in a new file. After the extracted file exists, try using the object select tool to remove the parts you do not want. You might find using the redaction tool to zero out the parts you don't want might work better. Unfortunately, a PDF is not a word processor type data file and the editing is likely not going to be easy.

  • Embed a jsf page in a jsp page -

    Is there some way to included a jsf page inside a jsp page and code form action correctly ?
    In my JSP page I have the following:
    <jsp:include page="../user/unMapTrans.faces" />
    The page loads correctly, however, when I submit the form I get "Cannot find FacesContext"
    The way I'm coding form action in my JSP <form method="POST" action="../common/controller.jsp">
    The way JSF generates <form id="utform" method="post" action="/riskdb/user/unMapTrans.jsp" enctype="application/x-www-form-urlencoded">
    The JSP is another location than the JSF being called... http://localhost:7001/riskdb/common/controller.jsp
    My web.xml:
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <Oct 26, 2005 4:44:14 PM CDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=5261939,name=riskdb,context-path=/riskdb)] Root cause of ServletException.
    javax.servlet.jsp.JspException: Cannot find FacesContext
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
         at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
         at jsp_servlet._user.__unmaptrans._jspService(__unmaptrans.java:252)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bear.clearing.pace.webapp.servlet.PaceHttpFilter.doFilter(PaceHttpFilter.java:85)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

    included a jsf page inside a jsp pageAlternatives:
    (1)Rewrite your jsp to a new jsf and use <f:subview> for jsp:include action.
    (2)Rewrite your jsf action to produce a non-jsf response.

  • Embed manually created servlet/dyamically built html into JSF Page.

    Hi there,
    I am wondering if anybody has ever tried embedding manually created pages (ie: using servlets to dyamically build an HTML page), inside of a JSF Page?
    The reason I ask is I have about 3000 of these pages already in production and can't really take advantage of JSF, without massive rewrites.
    Is there a way for the embedded page to communicate with the outer JSF Page?

    That works fine Thanks. Now the issue i am facing is if i have one chart and one table in one form , the form is always displayed first then table even if the table is drawn first in design time. IS there any way to Hide the graph Because this component does not have the rendered property.
    I want to render the graph conditionaly.Also Is it possible to change the graph type dynamically ie on selection of any radio button. I can get the handle of button in my Backing Bean.
    I tried to put the graph in Form PAnelBorder as well as in table and set the rendered property to false but still the graph is showing.
    Please help us....Pleas point us to some sample examples where thsi kind of scnario is done.
    Thanks
    Anshu

  • IWeb • How Do I Make Links in an Embedded PDF Document Open in New Page?

    On this page http://ostyn-newman.com/Gov_Downloads.html I have a PDF document that is embedded.  I tried an IFrame, but everything seemed to work better for me with the "Embed" code.  I am open to changing this if it would be better.  Here's my problem.  I can get the PDF document to display fine, but when I click on the links in the PDF document, the destination page opens in the embedded window.  I want the links to open the destination in a new window.
    I created the part of the document with most of the links (Pages 8.5 - 56) in Numbers and cut and pasted the table into a Pages document to create the completed document on our site.  I exported the docuemnt from Pages as a PDF file which is what you see.  There is also a link to download the file on the same page which works just fine.
    I have tried to insert the target="_blank" code but have not been able to get it to open the destination pages in a new window.  I am inserting the code by using the Insert/Widget/HTML Snippet Feature in IWeb.  Here is the code I am using.
    <embed src=
    "http://ostyn-newman.com/Media/GS27F0026XTextfile.pdf"
    style="width:850px; height:1000px;
    border-width:0px;
    border-color:#FFCC66;
    border-style:solid;"
    scrolling="auto" >
    </embed>
    I am not a coder and have just used Google to find the code to cut and paste and have played around with it to get to the place I am.  If anybody can tweak the code I have or offer some totally new code for me to insert that will get this to work would be greatly appreciated.
    Please keep in mind that most of the people who visit and use this page are government employees and are almost exclusivey using Explorer. 

    Thank you Jeff,
    I tried your original suggestion and now my inserted html widget reads
    <embed src=
    "http://ostyn-newman.com/Media/GS27F0026XTextfile.pdf"
    style="width:850px; height:1000px;
    border-width:0px;
    border-color:#FFCC66;
    border-style:solid;"
    scrolling="auto" target="_blank">
    </embed>
    It is live on my site.  You can see that the embedded document still opens the destination links in the embedded window.
    As for your other two suggestions, thank you as well.  I am aware of those techniques and did not use them because that is not how I want the other PDF links on the page to behave.  The catalog and autocad blocks downloads in the box at the top should simply download (or behave however the client's browser is configured to handle downloaded PDF documents or zip files.)  I don't intend to force those to open a new window.  I could also have our client click on a link to the PDF document and open it in a new page (like in your second suggestion) but I was hoping to embed the PDF and have it automatically viewable on our Download • Terms • Prices Page with all of the PDF search functions intact as well as the links be active.  My only complaint at this point is that the links in the embedded PDF document open the destination page in the embed window instead of a new window.  I only want to force a new window because the destination window doesn't behave properly when it opens in my embed window and it is difficult to figure out how to go back to the my PDF document when a destination window gets opened in the embed window.  The code you sent didn't do the trick.  Or maybe I didn't get it exactly right.  That is why I included it above.  Thanks for trying though.  I appreciate the effort.
    I would be willing to bypass the imbed/iFrame route altogether if I could just somehow drop the Pages document into the IWeb page and retain the search and link features, but I've not been able to figure out how to do that.  When I was exploring how to directly drop a Pages document into an IWeb page is when I stumbled on the method of embedding a PDF document into an IWeb page to retain the important search and link features.

  • How to set content type for a JSF page

    Hi,
    I want to know is there any way we can specify the content type of a JSF page, like in JSPs we have the page attribute <%@ page contentType="application/vnd.ms-excel" %>
    In JSP we can create a html table with values and if we specify the contenType as application/vnd.ms-excel, we would get an excel file generated.
    But do we have something similar to this is JSF, as I am using Facelets I cannot use page directive in the xhtml file.
    I tried setting the content type in MangedBean's action as follows
    ((HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse()).setContentType("application/vnd.ms-excel"); but it did'nt work.
    Thanks in advance.

    //add related mutip-part to combine parts
    MimeMultipart multipart = new MimeMultipart("related");
    //attach a pdf
    messageBodyPart = new MimeBodyPart();
    fds = new FileDataSource("h:/something.pdf");
    messageBodyPart.setDataHandler(new DataHandler(fds));
    messageBodyPart.setFileName(fds.getName());
    multipart.addBodyPart(messageBodyPart);
    //add multipart to the message
    message.setContent(multipart);
    //send message
    Transport.send(message);

  • JSF pages to display content from external URLs

    Hi,
    Is it possible for a JSF page that uses ADF controls, and the PanelPage component to provide menuing, etc. to actually allow a HTML page (accessed via a URL to an external site/application) to be displayed in an area within the JSF page?
    For example, clicking a menu item to an external HTML page results in the page being displayed in a Frame or similar within the JSF page?
    I've tried the FrameBorderLayout control and Frame control to try to embed a Frame to display such a page via the target setting for a menu item, but that doesn't seem to work. At least not when within a PanelPage. It works within a basic JSP page.
    I would have thought it would be possible for a JSF application to incorporate HTML content from other sites/servers as if part of the application. Even if this meant defining "wrapper" pages of some sort to effectively link these into the JSF application as part of it's navigation rules.
    Or am I missing something?
    Gene

    Thanks,
    Yes, using an iFrame tag within a verbatim tag worked, allowing me to specify an external URL to a page which is then displayed at the location where I placed the verbatim tag. I need to investigate sizing/border settings, but at least I now seem to be able to embed such pages.
    This works.
    I tried jsp:include as well, but that only seems to allow relative URLs to pages that a part of the application. And using the c:import JSTL tag would import a page at an external URL, but didn't seem to position it where I wanted it.
    Gene

Maybe you are looking for

  • Mac Pro will not Boot-Up

    My Mac Pro (Early 2008) will no longer boot-up correctly.  After having been in Sleep Mode for a few hours I tried to wake it up, but it would not wake.  I had to manually turn it off.  Upon rebooting I got to the gray screen with the Apple logo and

  • Suggestions for all in one wireless printer to work with iMac

    I am looking for a new all in one that will work with my iMac & Airport

  • Abap program to maintain variants in RSRPARAMETRIZA

    Hi, SAP provided an ABAP example to maintain 3.5 variants in NW04s Report Z_MASS_VARIANT_MAINTENANCE is available in the next u2018how tou2019 document. [http://www.sapadvisors.com/resources/HowtoInformationBroadcasting.pdf] This is only helpfull if

  • OS X update for intel MAC

    i have just done the update for intel mac- i can note that all windows have a steel grey finish now- i just wanted to check with others if they have the sasme finish or is it a problem with my mac also is this the way leopard will look like

  • Why re-distillation removes mapping to Unicode for Type0 fonts?

    Hello I need to re-distill a PDF. I save it as postscript and convert to PDF using Adobe Distiller. After re-distillation some of fonts are OK but Type0 fonts are not searchable any more because their ToUnicode dictionaries are not kept. Are there so