URL Portlet PDF format, in new window?

I have successfully installed the URL portlet and can render an Oracle report within in HTML format. I want it to display in PDF format, but it doesn't work...it displays source code. Is there a way to do this?
Also, the report display in place...how can I have just the URL displayed to link out to new window? Thanks...

Are you trying to render the PDF document inside the portlet? Portlets are really only meant to render content that can be displayed inside an HTML table. For a PDF document to share a page with other content, it needs to be in its own frame.
You can create a portlet that just has a link in it if you want the report to display in a new window. This is pretty easy using Content Areas.
null

Similar Messages

  • Open PDF's in new window in document library when using "Find a file" search

    I need to be able to open PDF's in a new window from a document library when using the "Find a file" search built into the document library "All documents" view. I currently have the following javascript on the page:
    _spBodyOnLoadFunctionNames.push("setTargetBlank()");
    function setTargetBlank()
    { $("a[href$='.pdf']").removeAttr('onclick').attr("target", "_blank");
    This works great when going to the document library and navigating through the folders then clicking on a link.
    The problem is when someone goes to the document library then uses the "Find a file" search and then they click on a link. The "Find a file" search does not do a postback (reload) of the page, therefore my javascript to find the PDF links
    and make them open in a new window does not run for the links on the page.
    I have read the following article but this does not seem to offer a solution that will work in this situation for SharePoint 2013 (Office 365): http://social.technet.microsoft.com/Forums/sharepoint/en-US/7ad3224c-3165-47ae-95bc-4f3928e2f9a8/opening-document-library-pdf-in-a-new-window-sharepoint-2013?forum=sharepointgeneral
    I suppose the idea solution would be to somehow tap into the event that is fired when using "Find a file" search to run my javascript and update the links for the search results.
    Can anyone offer any solutions to this issue?

    Hi,
    According to your description, my understanding is that you want to open PDF files in a new window from a document library when using the "Find a file" search.
    As you said, the "Find a file" search does not do a postback (reload) of the page, therefore JavaScript to find the PDF links and make them open in a new window does not run for the links on the page.
    I recommend to use JS link to achieve the goal. Create a JavaScript override file and upload the JavaScript file to the Master Page Gallery, and then set the JS Link property of the document library web part to point to the JavaScript file.
    Here are some links about the JS link in SharePoint 2013 for you to take a look:
    http://www.idubbs.com/blog/2012/js-link-for-sharepoint-2013-web-partsa-quick-functional-primer/
    http://www.learningsharepoint.com/2013/04/13/sharepoint-2013-js-link-tutorial/
    http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Opening Document Library PDF in a New Window (Sharepoint 2013)

    Hello,
    I have numerous PDF's in a document library. When the PDF opens in the browser, the PDF's contain links to various other sites; however, when the user clicks the link on the PDF from the document library, the link opens in the same window as the PDF. I would
    like the link to open the PDF in a new browser window.
    I have searched Google but cannot find anything for SharePoint 2013. We are hosting our SharePoint on the Office 365 package.  I found one solution that is repeated on many forums, but I do not see the "Convert to XSLT data view" anywhere
    in SharePoint designer 2013. The solution states:
    "Edit the document library in SharePoint Designer.
    1. Open the site in SharePoint Designer and then open the document library allitems.aspx.
    2. Right-click the document library web part and select “Convert to XSLT data view”.
    3. Locate the name column, you will see this tag “<A onfocus="OnLink(this)" HREF="{@FileRef}"….. ”, add “target=”_blank”” in tag.
    4. After this, the documents will be opened in a new window."
    I do  see my allitems.aspx and can open that with a text editor. The contents of that file are:
    <%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=16.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="ApplicationPages" Namespace="Microsoft.SharePoint.ApplicationPages.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"><SharePoint:ListProperty Property="TitleOrFolder" runat="server"/> - <SharePoint:ListProperty Property="CurrentViewTitle" runat="server"/></asp:Content>
    <asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
    <SharePoint:RssLink runat="server" />
    </asp:content>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"><SharePoint:ViewIcon Width="145" Height="54" runat="server" /></asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
    <SharePoint:RecentChangesMenu runat="server" id="RecentChanges"/>
    <SharePoint:ModifySettingsLink runat="server" />
    </asp:Content>
    <asp:Content ContentPlaceHolderId ="PlaceHolderBodyLeftBorder" runat="server">
    <div height="100%" class="ms-pagemargin"><img src="/_layouts/15/images/blank.gif?rev=32" width='6' height='1' alt="" data-accessibility-nocheck="true"/></div>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
    <WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main" />
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
    <SharePoint:ListProperty CssClass="ms-listdescription" Property="Description" runat="server"/>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderCalendarNavigator" runat="server">
    <SharePoint:SPCalendarNavigator id="CalendarNavigatorId" runat="server"/>
    <ApplicationPages:CalendarAggregationPanel id="AggregationPanel" runat="server"/>
    </asp:Content>

    did you try this one?
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/71b24f4b-570a-48fa-9ec3-91073eafaebd/open-pdfs-in-new-window?forum=sharepointadminprevious
    or trying to use the content editor web part...
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/9db08c4a-b53c-419a-84f8-001c194d1311/how-to-open-sharepoint-document-library-pdf-file-in-new-window?forum=sharepointadminlegacy
    try this solution...check the column which having the clickable link.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/99e9559a-da76-4722-982c-882b3e4181c7/hyperlink-column-type-open-in-new-window
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Opening PDF Document in New Window

    Hi,
    I have requirement to open pdf document in new window. I'm using Travel Expense form. I'm using the FM PTRM_WEB_FORM_PDF_GET. When I give 'X' to i_display_form, it displays the pdf document in same session or window. But I would like to open the pdf file in new window.
    The FM gives me pdf data of type RAWSTRING. Is there any FM or class where I can pass this data and open it in New Window.
    Can anyone please suggest on this.
    Regards,
    JMB

    download it using  gui_download and use cl_gui_frontend_services=>execute to execute that pdf file

  • Display pdf in a new Window in a JSPDynPage

    I need to display the pdf in a new window on click of a button in the iview. The pdf is fetched as an array of bytes from an RFC. It displays correctly, but in the same window. Pls see the extract of the code:
    To Write
    writeText(IPortalComponentRequest request, IPortalComponentResponse response, byte[] pdfResult)
    try{
    Document doc = new Document(PageSize.A4);
    javax.servlet.http.HttpServletResponse myResponse = request.getServletResponse(true);
    myResponse.setHeader ("ContentDisposition", "inline;filename=\"ShortCV.pdf\"");
    myResponse.setContentType("application/pdf");
    OutputStream os = myResponse.getOutputStream();
    os.write(pdfResult);
    PdfWriter.getInstance(doc,os);
    catch(Exception Ex){
    OnView(Event evt){
    JCO.Field Table1 = m_function.getExportParameterList().getField("PDF_STRING");
    client.execute(m_function);
    writeText(request, response, Table1.getByteArray());
    onView is called on
    Button myButton11 = new Button("myButton11");
    myButton11.setText("View");
    myButton11.setOnClick("View");
    myButton11.render(rendererContext);
    Pls advice

    Detlev .....
    I am still not able to implement your suggested solution.
    If I call javascript written in JSP, will I be able to pass a bean to it. Pls see the code that I hv in addition to the one posted ...
    In ICellRenderer ....
    if ( column == 11 )
    Button myButton11 = new Button("myButton11");
    myButton11.setText("View");
    myButton11.setOnClientClick("Test("beantv2")");
    In JSP
    <script>
    function Test(zBean)
    popAssetWinSpecs = "left=250,top=250,width=300,height=300,scrollbars=no,toolbar=no,menubar=no,resizable=no,status=no,titlebar=no,location=no";
    htmlfile="/irj/servlet/prt/portal/prtroot/AIPLetters.HersheyTeamViewerAIPPDF?zBean="+zBean;
    window.open(htmlfile,"editWindow",popAssetWinSpecs);
    return false;
    </script>
    in the doInitialization of the second comp
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    IPortalComponentContext compcontext = request.getComponentContext();
    AIPBean = new HersheyTeamViewerAIPBean();
    HttpServletRequest zHttpRequest = request.getServletRequest();
    AIPBean = (HersheyTeamViewerAIPBean)zHttpRequest.getAttribute("zBean");
    nothing gets executed ....
    I am not sure whether I am passing the bean correctly
    Thanks for your help,
    Devina

  • Display pdf in a new window

    I need to display the pdf in a new window on click of a button in the iview. The pdf is fetched as an array of bytes from an RFC. It displays correctly, but in the same window. Pls see the extract of the code:
    To Write
    writeText(IPortalComponentRequest request, IPortalComponentResponse response, byte[] pdfResult)
    try{
    Document doc = new Document(PageSize.A4);
    javax.servlet.http.HttpServletResponse myResponse = request.getServletResponse(true);
    myResponse.setHeader ("ContentDisposition", "inline;filename=\"ShortCV.pdf\"");
    myResponse.setContentType("application/pdf");
    OutputStream os = myResponse.getOutputStream();
    os.write(pdfResult);
    PdfWriter.getInstance(doc,os);
    catch(Exception Ex){
    OnView(Event evt){
    JCO.Field Table1 = m_function.getExportParameterList().getField("PDF_STRING");
    client.execute(m_function);
    writeText(request, response, Table1.getByteArray());
    onView is called on
    Button myButton11 = new Button("myButton11");
    myButton11.setText("View");
    myButton11.setOnClick("View");
    myButton11.render(rendererContext);
    Pls advice

    See Display pdf in a new Window in a JSPDynPage

  • Opening PDFs in a New Window

    Is there a good way to code a link to a PDF on a web page that would ensure that the PDF opens in Reader or in a new browser window/tab instead of in the same window/tab?
    Even though modern browsers allow users to configure their setup to allow PDFs to be opened within the same browser window (this might even be the default behavior nowadays), I've found that many customers end up closing the entire browser by accident after they finish reading the PDF. Then they have to open the browser back up again, sign in again, and navigate back to where they were. In order to reduce the chance of this happening, and to provide a better customer experience, I would like to force the PDF to open in Reader or in a new window/tab.
    However, when I have tried to do this in the past, I have run into many types of errors based on the different browser/platform/version combos that exist out there. Examples:
    Two browser windows are opened -- one blank and one with the PDF.
    The PDF opens in Reader, but a blank window/tab is also opened.
    The PDF won't close. I have to close the window that spawned it first.
    Many of these errors seem to occur on computers where the user has already set up their computer to not allow PDFs to open in the same window/tab. So that when I do something to force the PDF to open elsewhere, it kind of happens twice.
    Is there a nice, clean way to do this?
    Thanks,
    David Ashleydale

    Welcome to the Apple Discussions. To get the pdf file to open in a new browser window you will need to first upload the pdf file to the server and then create a text or image hyperlink to an external page and use the URL to the pdf file. If you have a MobileMe account and put the pdf file in the Web/Sites folder the URL you would use in the Inspector/Links pane would be:
    http://web.me.com/yourMMe_accountname/filename.pdf
    If you were to add a folder to the Sites folder titled PDFs and put the file in it the link would be:
    http://web.me.com/yourMMe_accountname/PDFs/filename.pdf
    OT

  • Opening a PDF in a new window

    I'm using Captivate 3 and have a button with a simple link to
    a pdf file. The pdf file loads okay but it takes over the popup
    window which the training is in.
    I'm using an LMS and the Captivate file appears in its own
    window, i've tried changing the url to either
    current/new/parent/top but its not what i want.
    new causes it to open a new window in the same popup window
    which i could 'possibly' have, best solution of a bad bunch.
    But want to simply click on the link and a brand new window
    opens with the pdf ? Sure i've tried everything ?
    Any ideas ?

    Hi psj3809
    Since you seem to have exhausted all the Captivate supplied
    possibilities, I'm guessing the only recourse you really wish to
    consider may be to use JavaScript. You may be interested in the
    following link:
    Click
    here.
    Cheers... Rick

  • How do you open a link within a PDF in a new window?

    I created a PDF that will be viewed in a browser. Is there a way to set the links within the PDF to open in a new window?

    Did you get an answer to this?   I am having the exact same issue.  My source html document has a link which specifies a target of _blank, but when I generate a pdf from that html doc, view the PDF in my browswer, and click the link, it overlays the PDF instead of opening a new window with the linked URL.  I've seen this posted as an issue a number of times, but have yet to see a solution.

  • HYPERLINKS  is it possible to use "_blank" to open PDF links in new window?

    When I export my PDF from Numbers '08, is it possible to have my Hyperlinks open in a new window? Possibly using the "_blank" HTML function inside the URL dialog? Right now the links just replace the PDF.
    *I've tried ex)*
    http://www.website.com target="_blank"
    http://www.website.com, target="_blank"
    Those don't seem to work. Any ideas? Is this fixed in '09?
    Thanks
    PS - seems there should be a checkbox saying "open hyperlink in new window". Just makes sense.

    Yes, true. But there is a way (in HTML) to force a link to open in a new window by including the "target=_blank" command. I'm wondering if Apple (or anyone else) has found a way to embed this into the "Hyperlink" property within Numbers? If not, it would be nice if future versions had a check box to include this option with a link in the Hyperlink property inspector.
    Thanks for the feedback!
    Message was edited by: flashburn3030

  • How to open PDF file in new window as default

    I have .pdf documents into which I have inserted links to other .pdf documents using pdfEdit995
    (I am a 77-year-old pensioner recording monumental inscriptions, not very computer literate and not able to afford expensive applications !) 
    The links in the temp.ps file (which pdf995 creates first) look like :-
    [ /Rect [85 225 107 228]
    /Border [ 0 0 0 ]
    /Action /Launch /File (.\\Another Folder\\TARGET FILE.PDF)
    /Subtype /Link
    /ANN pdfmark
    The links work fine, but open in the same window, which is annoying as it is then neccessry to re-open the original document, scroll down to the required page and find the next link.
    pdf995 support say that perhaps Adobe reader can be set to open in a new window, but I want this to be the default when I circulate my file to interested people, so would prefer to modify the links.
    Can anyone help with a smple solution ? (I also believe in Santa Claus !)
    System: Vista; Reader X 10.1.0

    I don't know if you can change this in the PS file, but if you had Acrobat you could embed the following code into your file, that will make sure the links open in a new window. However, you should be aware that this code will change the preferences at the application level, which some people might not appreciate.
    The code is:
    app.openInPlace = false;

  • From a PDF in a browser window - open links within in that PDF in a new window

    BACKGROUND SCENARIO:
    Users view a PDF document within their browser window (default behavior at my organization).  Key point is, the PDF isn't being viewed in an Acrobat Reader window, it's being viewed within the browser window.
    Within that PDF, are many links to intranet pages. And incidentally, this PDF happens to be a document that is updated frequently (More on this caveat in a moment)
    EDIT: The end users are end users, smart people, but not necessarily super-sophisticated computer users.
    MY QUESTION:
    When a user clicks a link within the PDF, I want the new page to open in a new window, NOT in the same window that the PDF was being viewed in.
    I've done a fair amount of homework:  The prevailing answer is to use Acrobat Pro's "LINK" feature to turn the hyperlink into a javascript command that opens the link in a new window, and to do this (a) MANUALLY, (b) ONE LINK AT A TIME, and (c) Repeat steps (a) and (b) EACH TIME the document gets updated.   (Back track now to my earlier caveat.. this is a frequently changing document with lots of links... Doing manually and repeating the whole process each time the document is updated is a lot of work.)
    I believe there are some add-on products that make this easier too.
    So my question is...  Other than add-ons, Is there another way?  a better way?  a more efficient way?  Or is there another way, on the way?
    SOMEWHAT RELATED QUESTION:  (EDIT)
    Another answer that would more or less satisfy me:  is there a way either from the calling HTML page, or from within the PDF document itself, to force the PDF to open within its own Acrobat Reader window, rather than within the browser window?  That would mostly dodge the issue, by opening linked pages in the browser anyway.
    A little extra background information: The document also uses password protection (a management requirement), which is why opening the links in the same window is such a pain.  Back-keying back to the document after viewing the link requires re-typing the document password, a noted pain.  I'd accept a fix to that particular problem too, but I don't think there is one.  Either way, the new-window question is one I'd like to solve.  (FYI, I asked the password retype question separately over in the security forum, here:  http://forums.adobe.com/message/5055162#5055162).

    You can't update the destination for a link using JavaScript, because there's no way to read the link's current action. While there is a setAction() function to create a new action on an existing link, there's no "getAction" function.
    In terms of how a PDF file opens, nothing in the document or in the HTTP headers can influence whether the file is opened in the browser or on the desktop - that's a user preference. What you can do with scripting on the server is send HTTP content-disposition headers that define the PDF file as something the user should download and save, rather than something the browser should try to open.

  • Opening URL for report in a new window

    I have a report with URLs to other reports, and also to dialogs in Dynamics CRM. The URLs all work perfectly, however, I want to open the reports the URLs point to (and the CRM dialogs) in a new window. I tried adding &rc:LinkTarget=_blank to the
    end of the URL, but that causes an Invalid Parameter error:
    >System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #969F3622: System.InvalidOperationException: CRM Parameter Filter - Invalid parameter 'rc:LinkTarget=_blank' in Request.QueryString
    on page /Company/cs/dialog/rundialog.aspx
    >The raw request was 'GET /Company/cs/dialog/rundialog.aspx?DialogId=%7bc4918a58-6faa-4915-8620-1ebfb1980263%7d&EntityName=phonecall&ObjectId=%7bC51D5ECC-DF43-E411-BC10-00155D3FE201%7d&rc:LinkTarget=_blank' called from
    http://vulcanbasevm/Reports/Reserved.ReportViewerWebControl.axd?ReportSession=bzys1s55lpwiai55sny1borg&ControlID=e5c10494dc3048b199babe9e2aabd82a&Culture=6153&UICulture=9&ReportStack=1&OpType=ReportArea&Controller=ctl143&PageNumber=1&ZoomMode=Percent&ZoomPct=100&ReloadDocMap=true&SearchStartPage=0&PageCountMode=Estimate&LinkTarget=_top.
    >   at Microsoft.Crm.Application.ParameterFilter.ValidateParameter(HttpRequest request, ArrayList parameterCollection, String key, String value, ParameterSources source, EntityType pageEntityType, FormAdditionalAllowedParameters additionalAllowedParameters)
    >   at Microsoft.Crm.Application.ParameterFilter.ValidateParameters(Page page, EntityType pageEntityType, Boolean alwaysEnableParameterChecking, FormAdditionalAllowedParameters formAdditionalAllowedParametersTemp)
    >   at Microsoft.Crm.Application.ParameterFilter.ValidateParameters(Page page, EntityType pageEntityType, FormAdditionalAllowedParameters formAdditionalAllowedParametersTemp)
    >   at Microsoft.Crm.Application.Controls.AppPage.ValidatePageParameters()
    >   at Microsoft.Crm.Application.Controls.AppPage.OnInit(EventArgs e)
    >   at System.Web.UI.Control.InitRecursive(Control namingContainer)
    >   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Hi ,
    You can try with below ;
    ="javascript:void(window.open('http://www.google.ca','_blank'))"
    I use google url you can type your URL.
    you can take help from below link;
    http://www.bidn.com/blogs/BrianKnight/ssis/972/ssrs-action-to-open-a-url-in-a-new-window
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem.

  • Pdf showed in new window. Help needed!

    Hi all,
    This is my first post (but a thousand read), and i want first to thank you all for all the information i have read in this forums for years.
    I have a problem which is giving me more problems that i expected. In my webapp, i want to show a pdf document in a new page of the navigator when a button is pressed. I have discarded the target blank option in the container form because i have others buttons and dont want them to be opened in new windows, just the one that open the pdf.
    So, I used another navigation rule to open a new window. This page have to make de pdf in code an send it to the client. I dont know how to execute that code on the load of the page.
    The solution i am trying is using a poll that only will be called once and in the pollListener execute that code. The problem is that does not work to send the response to the client in the client. Here is the code of the pollListener:
    byte[] file; //Don't worry about it. Contains the file pdf i want to show.
    FacesContext fctx = FacesContext.getCurrentInstance();
    HttpServletResponse response =
    (HttpServletResponse) fctx.getExternalContext().getResponse();
    response.setContentType("application/pdf");
    response.setHeader("Content-Disposition",
    "inline; filename=\"file.pdf\"");
    response.setHeader("Cache-Control", "no-cache");
    response.setContentLength(file.length);
    ServletOutputStream sos = response.getOutputStream();
    sos.write(fichero);
    sos.flush();
    sos.close();
    fctx.responseComplete();
    The curious thing is that if i change the content-disposition to atachemement instead inline, it works asking me to download the file, however, i want it to open directly in the new window and is because of that i use content-disposition inline.
    I am almost killing myself because of this problem. Anyone can help me?
    Thanks in advance!

    First of all, you don't need to do this with a workaround using a Poll listener. I assume that one page has a commandButton or commandLink that is used to show the PDF, right?
    Set the useWindow property of the button or link to "true".
    Set the actionListener property of the button or link to a method in a backing bean that looks something like this:
        public void showPDF(ActionEvent actionEvent) throws IOException {
            //Setup the output
            String contentType = "application/pdf";
            FacesContext fc = FacesContext.getCurrentInstance();
            HttpServletResponse response =
                (HttpServletResponse)fc.getExternalContext().getResponse();
            /* Notice that I don't set the Content-Disposition header - inline is default. */
            response.setContentType(contentType);
            ServletOuputStream out = response.getOutputStream();
            /*  Do whatever you need to do to write the pdf to "out" here. */       
            out.flush();
            out.close();
            fc.responseComplete();
        }

  • Open PDF in a new window

    Hi. I'm trying to create a PDF and open it in a new browser window. I've already achieved to create the PDF and it seems to work fine when it opens in the current browser window but that's not what we are looking for.
    This is the code where I call the open report method:
    <h:commandLink id="informe" target="report"
                 onclick="openReport();"
              action="#{listadoPDSBean.mostrarInforme}"
              styleClass="boton"
              value="Ver Informe"/>Here is the javascript method where I open the new window (and about:blank window).
    function openReport() {
              nuevaVentana = window.open("about:blank", "report", "type=window, fullscreen=no, Menubar=no,
                    Status=no, Titlebar=no, Toolbar=no, Location=no, Directories=no, Resizable=yes");
    }When I try this it opens a new blank window and then opens the report in the application window.
    I'm sorry for my bad english.
    Thanks!

    Thanks, Alf.redo. That's what I'm doing now (I think). I have a commandLink that calls a method that writes the PDF. Here is:
    public void doGenerarReport(List listaInstancias, Map parametros,
                   String nombreReport, String formato) throws JRException,
                   IOException, URISyntaxException {
              // Obtener DataSource de la lista dada
              JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(
                        listaInstancias);
              HttpServletResponse response = FacesUtils.getResponse();
              response.setHeader("Content-Disposition", "inline; filename="
                        + nombreReport + ".pdf");
              ServletOutputStream out = response.getOutputStream();
              // Se obtiene el .jasper, el report compilado
              JasperReport report = getJasperReport("es/jda/cma/mrvca/reports/"
                        + nombreReport + ".jrxml");
              JasperPrint jasperPrint;
              try {
                   jasperPrint = JasperFillManager.fillReport(report, parametros, ds);
              } catch (RuntimeException e) {
                   log.error("Error rellenando el report " + nombreReport, e);
                   throw e;
              // Tratamos las caracter�sticas espec�ficas de cada uno de los formatos
              JRAbstractExporter exporter = null;
              if (formato.equals(PDF)) {
                   exporter = new JRPdfExporter();
              } else if (formato.equals(HTML)) {
                   response.setContentType("text/html");
                   exporter = new JRHtmlExporter();
                   exporter.setParameter(
                             JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, false);
              } else if (formato.equals(EXCEL)) {
                   response.setContentType("application/vnd.ms-excel");
                   exporter = new JRXlsExporter();
                   exporter.setParameter(
                             JRXlsExporterParameter.IS_AUTO_DETECT_CELL_TYPE, true);
              } else {
                   log.error("Error exportando el report el formato : " + formato
                             + " no se reconoce. Los formatos reconocidos son " + PDF
                             + ", " + HTML + " y " + EXCEL + " ");
              try {
                   exporter
                             .setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
                   exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
                   exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING,
                             "ISO-8859-15");
                   exporter.exportReport();
              } catch (RuntimeException e) {
                   log.error("Error exportando el report " + nombreReport, e);
                   throw e;
              out.flush();
              out.close();
              // Le indicamos a JSF que no queda nada por hacer.
              FacesContext.getCurrentInstance().responseComplete();
         }I try to open a new window with javascript. The new blank window opens in fact (when I create it with window.open. Just target="_blnak" doesn't work) but I cannot put the PDF inside of it. The PDF just opens in the current window not in the new one.

Maybe you are looking for

  • Creating PDF in OAF page using DocumentHelper class

    I an trying to display a PDF from within an OAF page. I am generating the XML using a database function and getting the XML in the controller class as a clob object which I then converted into an ascii stream. I tested the stream, and I am getting th

  • How to use Value Variable in Report Painter Column defined as Formula

    Hi Gurus, In report painter, how can I add one field (exchange rate) in selection screen, so that user can provide the exchange rate to be used, then execute the report, the exchange rate will used to multiple local currency amount. The reason for th

  • I cannot open a new tab unless I right-click on a link and select "Open link in new tab"

    When I click the plus sign to open a tab, and even when I go to "File" and then "New Tab" Nothing happens. The only way I can get a new tab to open is by right-clicking a link. I've tried closing and restarting the browser, and even restarting my com

  • Sim card does not appear to be supported

    ok so i have iphone3gs and i just updated my itunes but after its done my phone isnt working with my sim card ! i have tmobile and i know tmobile doesnt have iphones but ive had this phone for 4 months now and it was working perfectly untill i update

  • Env-entry reachable from more than one bean

    Is it possible to reach env-entries of one session-bean from another session-bean within same ejb-jar.xml? Or is the only way to write them twice, once per each bean.