Weird jsf component behavior after exporting pdf to outputStream ~~

Hi,
I have a page which has a selectOneMenu control (allows user to select a workshop name) and a commandLink (generates a corresponding workshop pdf and opens in a separate browser window). All command actions are working fine(including the pdf generation).
I used the following code to export pdf to the browser
                HttpServletResponse response =
                   (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext ().getResponse ();
             response.setContentType ("application/pdf");
             response.getOutputStream ().write (bytes);
             response.getOutputStream ().flush ();
             response.getOutputStream ().close ();
             FacesContext.getCurrentInstance().responseComplete ();However, after viewing and exporting the pdf successfully from the browser, when I choose a different value in the slectOneMenu control again, the page then displays
%PDF-1.4 %���� 4 0 obj <>stream x&#156;�&#155;]o�6&#134;��+�&#155;�T~&#136;"��dm �$z1��&#147;&#153;��ey�&#146;b�~&#148;(:�c3&#134;���K_RP�kr9I81����&#133; I&#149;|�����}������&#151;I��Cn�&#150; ?�&#131;;�G��&#159;��Y"�&#153;�*Q&#134;�{&#139;�����?�2���o��vv7ehpvv7er��1Fe��U���A4&#147;)�&#155;.g]&#151;}W]���f����~�X��q`����u34�c�)�� ��H�"i2SP�T�_���(L|�&#155;1C�'&#149;O�27&#148;&#145;��X#&#147;��te�r&#135;~ ��1�H&#149;���U3&#154;)�7&#147;�T�
instead of the same page with a different value in the selectOneMenu control.
Any ideas or suggestions? Thanks in advanced!!
Moreover, while searching for a solution for the problem on google and developer forums, I found a posting suggesting adding
{code}
context.getApplication().getStateManager().saveSerializedView(context);
{code}
before
{code}
FacesContext.getCurrentInstance().responseComplete ();
{code}
however, the suggestion did not solve the problem.
Any ideas or suggestions would be greatly appreciated. Thanks!!

Hi all,
I was able to resolve this issue by forcing the page to refresh itself when the commandLink control was clicked. However, for IE users, there would be a dialog box asking the user to click on "Retry" in order to refresh the page.
Any ideas or suggestions on how to eliminate the dialog box in IE would be greatly appreciated. Thanks in advanced!!

Similar Messages

  • Strange crash after exporting PDF...

    I have a script with the following at the end:
    var pathName = "~/Desktop/salesChartEMC.pdf";
    var saveName = new File (pathName);
    saveOpts = new PDFSaveOptions();
    saveOpts.compatibility = PDFCompatibility.ACROBAT5;
    saveOpts.generateThumbnails = true;
    saveOpts.preserveEditability = true;
    templateFile.saveAs(saveName, saveOpts);
    templateFile.close(SaveOptions.DONOTSAVECHANGES);
    alert("PDF successfully saved as "+pathName);
       The script keeps crashing at the templateFile.close(...) line.  If I comment out that line, the script works without crashing and I can switch back and forth between open documents and work as normally.  However, as soon as I manually close the PDF that is still open, Illustrator crashes again.  Has anyone run into this behavior before?

       Fixed.  This had to do with some code earlier i nthe script.  I had moved some objects from one document into the document I was exporting.  Instead of moving, I duplicated them into the new document (with new variable names) and then removed the old one.  This fixed the crashing issue for some reason.

  • Why after exporting PDF to Word some characters are not displaying accurately.

    I exported a PDF to Word and it changed the case of some of the characters from upper case to lower case and even changed the font. In some areas the kerning is wonky too. What do I need to do differently?

    Very likely you are not needing to change anything. Some variation in output can be found depending on the data structure of the file involved.
    Will Adobe ExportPDF convert both text and formatting information?Adobe ExportPDF is capable of exporting high quality information,  but the quality of your Word document depends on the quality of the PDF  file you start with. For instance, if your PDF file was originally  authored in Microsoft Word and converted to PDF using the PDF Maker  functionality in Adobe Acrobat® software, your PDF file contains a rich  set of information that can be captured by Adobe ExportPDF. This  includes relative positioning of tables, images, and even multicolumn  text, as well as page, paragraph, and font attributes. If your PDF file  was originally authored using simpler PDF generation methods, such as  “print to PDF” or “scan to PDF” options, Adobe ExportPDF will convert  any recognizable text and then use sophisticated conversion intelligence  to preserve as much of the page layout as possible.

  • Id cs5 export pdf problems

    i create 4 layer in my id file.
    after export pdf file i find there are words missing and i need to change words to different layer to solve the problem.
    also there is some words position changed but i can't find out after export pdf for output.
    this cause big problem for output file with pdf format!

    mac os 10.6.5  indesign already update to 7.0.3
    my setting
    this is my indesign file
    this is pdf
    i use the function of auto page number but some page number miss

  • Hyperion IR 9.3.1 - Issue in printing the report after exporting it to pdf

    Hi All,
    I am facing a problem in printing the report after exporting it to pdf format using Hyperion Interactive Reporting 9.3.1. I have set page size of report section to 11X17 inch landscape. Now I am exporting this report section to pdf. Report gets exported to pdf with size 11X17 inch landsacpe. But when I am trying to print this pdf it is shrinking the documnet size to A4 size paper and printing it rather it should print it on 11X17 inch paper size. Please suggest if there is fix available for this issue.
    Thanks
    Ujjawal

    "File &gt; Print Setup &gt; Paper &gt; Size" on PDF.
    I think this issue is only to do with the printer and not IR.
    I think the question now is "Can your printer print 11X17 pages or not".

  • Hyperlinks from other placed indd documents or pdfs getting lost after export to PDF

    after upgrade vom CS 5.5 to CS 6: hyperlinks from other placed indd documents or pdfs getting lost after export to PDF
    I tried all options for the as well known and working export options

    after upgrade vom CS 5.5 to CS 6: hyperlinks from other placed indd documents or pdfs getting lost after export to PDF
    I tried all options for the as well known and working export options

  • Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem. iPad 2, iOS 5.0.1

    Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem.
    iPad 2, iOS 5.0.1

    Why icannot export pdf file from other app to ibook (after update today)?. Please correct my problem.
    iPad 2, iOS 5.0.1

  • Failed to display CR after export to PDF in Browser

    Post Author: asnila
    CA Forum: Exporting
    Hi,
    I had a problem to display CR after export to PDF in browser. No message error displayed except the browser is blank.
    Below is the code that i had been used.
    Dim RptFilePath As StringDim RptExportOpt As CrystalDecisions.Shared.ExportOptionsDim ExportLocation As New CrystalDecisions.Shared.DiskFileDestinationOptionsDim ExportPath As StringRptFilePath = "C:\Project\reportPro.rpt"myReport.Refresh()myReport.SetDatabaseLogon("root", "", "localhost", "dbpro")ExportPath = "C:\Project\reportPro.pdf"ExportLocation.DiskFileName = ExportPathRptExportOpt = myReport.ExportOptionsWith RptExportOpt.DestinationOptions = ExportLocation.ExportDestinationType = ExportDestinationType.DiskFile.ExportFormatType = ExportFormatType.PortableDocFormatEnd WithmyReport.Export()Response.ClearContent()Response.ClearHeaders()Response.ContentType = "application/pdf"Response.WriteFile(ExportPath)Response.Flush()Response.Close()MyConnection.Close()
    Fyi, i'm using Crystal Report 10 embedded with VS 2005. Please help me.

    It looks like the 2 DLLs you mentioned, are getting corrupted or modified due to some operation that might have been performed on them. Can you please try the below mentioned instructions and see if that gets your application to install without any errors:
    1. Try installing your business app.
    2. When you see the error message as stated, try running the below mentioned commands: (Start | Run | Type cmd and hit Enter)
        regsvr32 LTKRN11n.dll /i /s
        regsvr32 LTKRN11n.dll /s
        regsvr32 LTDIS11n.dll /i /s
        regsvr32 LTDIS11n.dll /s
    3. The above commands should fix the issues in the mentioned DLLs and allow normal installation of your business app.
    Hope this gets your app to work and install properly.

  • Indesign CS4 button flashes after exported to PDF and viewed in Acrobat Reader/Professional X

    Hey everyone,
    Greetings!
    I've encountered this odd problem when preparing my portfolio.
    I've created some 40 buttons in InDesign CS4 (all according to the official tutorial) to Show/Hide Fields (specificly images), and navigate through the pages.
    The buttons all have their own Normal and Rollover states, but no Click states.
    After exporting the file to PDF, I tested the buttons in Acrobat Reader 9 and Acrobat Pro 9, and both the actions and the states worked fine.
    BUT that's not the case with Acrobat Reader X or Acrobat Pro X.
    The actions are still there, showing the images and navigating, but the states are not!
    The buttons' rollover states just flashes when the mouse hover above them, and even in Normal state, they kept *blinking* randomly.
    Frustrated for a week.
    PS. I suspected and used a Indesign file with only one simple button to rule out the following:
    1. Overlapping buttons
    2. Slow processing due to large image size
    3. Mishandling of transparency
    At this moment I'm pretty sure it's an Acrobat thing...Help!

    Thanks Dave! I was in the middle of writing this when your post came in:
    Not sure if this will help anyone, but I changed the button fill color to white and it seemed to fix the flicker. I exported each state from indesign as a PDF and recreated the button from scratch. This still had the flicker. I'm guessing something strange is happening with the transparancy of the states.
    Glad to hear it's fixed!

  • Export of PDF errors after the PDF generates on the server (File I/O error)

    We have Crystal 9 reports engine, developed with VS2003, which is being called from a VS2008 web app on a 32-bit server. The reports have been working okay, unless the file is of size > 600K. Then, right after the PDF is created in the C:\Windows\Temp, the export fails to display it on the screen, throwing the following error:
    Error in File C:\WINDOWS\TEMP\temp_c2e5676e-7d48-413e-9dca-fd2615f236c6.rpt: File I/O error.
    at [1].[1]D(Int16   , Int32   ) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export() at commisionstatement.CommissionStatementPDF.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
    The issue is quite frustrating as it doesn't indicate what the cause of it is. It is not clear whether this is a timeout issue and what Timeout setting applies. The report objects have a default CacheTimeOut set as CachedReportConstants.DEFAULT_TIMEOUT. How long is this? is there any other setting on the server that can overwrite this timeout? What does the Export method need in order to find and pull the file on time?
    Note that the report generates on the server and if it's not too big, will display on the Client's browser.
    Your help will be greately appreciated.
    Thank you,
    Sonya

    Hi David,
    So we were finally able to test with the increased timeout, which we set to 5 min:
    <httpRuntime
                executionTimeout="300"
                maxRequestLength="4096"
                useFullyQualifiedRedirectUrl="false"
                minFreeThreads="8"
                minLocalRequestFreeThreads="4"
                appRequestQueueLimit="100"
                enableVersionHeader="true"
            />
    Unfortunately, now we started getting other errors, related to the limit of the licenses:
    A Crystal Reports job failed because a free license could not be obtained in the time allocated. More licenses can be purchased direct from Crystal Decisions or through the Crystal Decisions Online Store.
    According to page 8 of the article below, we should be able to purchase more such licenses free of cost:
    http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/7006fc4c-6a1e-2b10-8ea8-9019b136fa90?quicklink=index&overridelayout=true
    Could you let us know how to proceed in order to obtain the licenses?
    Thank you,
    Sonya

  • No Hyperlink in PDF after export from Crystal Reports 2008 SP2

    When I export a report from Crystal Reports 2008 Developer (as well as from the runtime) SP2 to PDF the Hyperlink to a file on hard disk is missing.

    Hi,
    Go through this LInk
    Re: No hyperlinks after exporting to pdf
    Regards,
    Salah

  • URL button doesn't work after export into ppt/word/pdf

    Hi,
    I am working in Xcelsius.
    Lets say I have placed a URL button in the Canvas and mapped that to a path of the file(which is not actualy an URL),but any path of the file which is present in the local system
    After exporting this dashboard into ppt(or word/pdf),when i click the button,its not redirecting me to a target.
    But during Preview of dashboard,it works fine.But after exporting,the URL button not redirects me to the path specified.
    Rgds,
    Murali

    Hi
    U got any solution for the above problem?
    Thanks
    Kothai

  • Pictures in insert in form central not visible in pdf formular after export

    Why it is not fisible to see the picture in the pdf formular after export from FormsCentral

    Hi,
    Please refer to the following FAQ document: http://forums.adobe.com/docs/DOC-4144
    Post back to this thread if it doesn't help to resolve the issue.
    Regards,
    Brian

  • Am exporting html table containing images data into pdf and after exporting images are not displaying in pdf document.

    Hi all,
             I trying to export html table which contains images into pdf through java script but after downloading pdf file am unable to see images.Is this problem with plugins are any other.Can any one help me out from this.
    Thanx in advance.

    Another option will be
    window.print(); as pdf. 
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • "View Pdf After Exporting" Moves Acrobat to Background

    Wow, even this forum is buggy. I just lost my entire post because the "server wasn't responding". That'll teach me to copy and paste my post into a text file before hitting the Post Message button.
    Here goes again:
    I've tried getting an answer for this problem in the InDesign forum with no response after a week.
    OSX 10.6.7
    Acrobat 9.4.3
    InDesign 7.0.3
    Conditions:
    Step 1) Only InDesign is running. I make a pdf with the "View Pdf After Exporting" box checked. The pdf is created, Acrobat opens and displays my pdf for me as it did in 8 and before.
    Step 2) With only InDesign and Acrobat running, I repeat step 1 above, I get the same result EXCEPT that Acrobat immediately pops into the background.
    This never happened with any version previous to InDesign CS5 and happened before I installed Acrobat 9, sending Acrobat 8 into the background.
    This is a very frustrating bug.

    This is the best place to report bugs. They get counted and logged: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

Maybe you are looking for