How to open a byte array of pdf into acrobat reader dynamically..

hi,
my java program is connecting to a url and downloading various file(.pdf,.xml format) into hard-disk. now the requirement is if user select "Preview" button, then file is downloaded and opened with appropriate application(acrobat reader for .pdf file) but not saved anywhere in hard-disk ...
any idea, any hint any help is welcomed..
thanks in advance..

hi friends,
i got the solution. i am using one external api of adobe acrobat, through which i am able to stream pdf document in form of byte array into acrobat viewer,without writing data in any file.
so my work is done.. :)

Similar Messages

  • Use byte array of PDF to display PDF in IE browser

    I get byte array of PDF as input argument. I need to use byte array to display PDF in IE browser. I am writing code in doGet method of Servlet to accomplish this. However, PDF never gets displayed. I see Acrobat starting, but original PDF never gets displayed in browser.
    I am using code below in doGet of Servlet:
    resp.setContentType("application/pdf");
    resp.setHeader("Expires", "0");
    resp.setHeader("Cache-Control","must-revalidate, post-check=0,
    pre-check=0");
    resp.setHeader("Pragma", "public");
    resp.setHeader("Pragma", "no-cache"); //HTTP 1.0
    resp.setDateHeader("Expires", 0); //prevents caching at the proxy
    server
    resp.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
    resp.setHeader("Cache-Control", "max-age=0");
    resp.setHeader("Content-disposition", "inline; filename=stuff.pdf");
    byte[] inBytes = getBytesOfPDF(...);
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
    if(inBytes !=null){
    outStream.write(inBytes);
    outStream.flush();
    I added dummy name of PDF (stuff.pdf) for display, as I heard IE requires a file name with .pdf extension for display.
    But I had no luck with the code above.
    Any help with code will be appreciated.
    [email protected]

    Hi
    Am using the same code and i am able to get the PDF out.
              /* Finally writing it into a PDF */
                   response.setContentType("application/pdf");
                   /* filename could be any thing */
                   response.setHeader("Content-Disposition",
                             "attachment; filename=Report.pdf");
                   response.setContentLength(content.length);
                   response.getOutputStream().write(content);
                   response.getOutputStream().flush();
    But this also throws a error in the server :
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
         at org.apache.catalina.connector.Response.getWriter(Response.java:606)
         at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)
         at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:344)
         at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:280)
         at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:225)
         at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:174)
         at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:239)
         at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1142)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:879)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at org.ca.ielts.presentationtier.servlet.AuthorisationAuthenticationFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Any Clues how this has to be fixed.????

  • FF 19 for Mac. changed preferences to open PDFs with Acrobat Reader. Now when I click on a pdf link, an about:blank FF window opens (pdf then opens)

    The change in preferences opens the pdf appropriately with Acrobat Reader, as desired, but before it does, FF opens a brand new blank window (about:blank). How can that action be stopped?

    Yes, I mean the eternal application.
    Ctrl-click does open the dialog, but that does not cause new/blank FF window to show up.....however shift-click opens the new/blank window, then opens another FF window with a "New Tab" heading, then opens the pdf with Acrobat Reader.....
    If open the dialog and select "open in new tab" (open in Acrobat Reader is not an option), a new tab is opened, and the the pdf come up in Reader (without opening a new FF window). In earlier FF, it just opened directly in Reader (or acrobat) without opening a new tab or window.
    Thanks

  • How put some PDFs in Acrobat Reader on iPad ? On the Adobe Cloud  ?

    How put some PDFs in Acrobat Reader on iPad ? On the Adobe Cloud  ?
    Thanks !!

    pierreswaggy,
    If you have a PDF document opened in some other app on your iPad/iPhone, you can use the "Open In" feature to open it in Adobe Reader for iOS.
    For iPad, see How to open PDF documents in Adobe Reader for iOS (iPad on iOS 7 or 8 version)
    For iPhone, see How to open PDF documents in Adobe Reader for iOS (iPhone on iOS 7 or 8 version)
    If you have PDF documents on your Mac or Windows desktop/notebook computer, you can use Acrobat.com (cloud storage) to share them with your computer(s) and mobile device(s).
    On your Mac/Windows computer
    Open a web browser.
    Go to Acrobat.com (https://cloud.acrobat.com).
    Sign in with your Adobe ID.
    Upload your files to Acrobat.com.
    You can also use the desktop version of Acrobat or Adobe Reader to open a PDF document from Acrobat.com or save to Acrobat.com.  Please check the File menu or the toolbar for the options.
    On your iPad/iPhone
    Launch Adobe Reader for iOS.
    Go to the Reader home screen.
    Tap My Account (in the lower left corner).
    Sign in with your Adobe ID.
    Tap Acrobat.com in the left pane to see the files on Acrobat.com in Reader.
    If you have a lot of large PDF documents on your computer, it would be easier and faster to transfer them to your iPad/iPhone at once (instead of one document at a time) using iTunes.
    See How to transfer PDF documents from your computer to your iPad/iPhone.
    The documents transferred to your iPad/iPhone using iTunes will appear in the Documents section.  Because they are stored locally on your iPad/iPhone.  Please note that any locally stored documents will be erased by iOS, if you uninstall (instead of update) the Reader app.
    Please let us know if you have additional questions or any problems.

  • I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    Just use Drop Box instead.

  • How to Publish on the Web a PDF document in Reading mode only

    Hello,
    I'm planning to post on my web site my manuscript in PDF format. I would like to make it available in a reading mode only.. I wonder if ADOBE LIVECYCLE Rights Management would allow me to do so in a safe manner. What would be the cost?
    Thanks.
    PATEGA

    Thank you for your reply.
    De : Test Screen Name 
    Envoyé : 15 septembre 2014 05:51
    À : Gaétan Patenaude
    Objet :  How to Publish on the Web a PDF document in Reading mode only
    How to Publish on the Web a PDF document in Reading mode only
    created by Test Screen Name <https://forums.adobe.com/people/TestScreenName>  in Adobe PDF Pack - View the full discussion <https://forums.adobe.com/message/6730511#6730511>

  • How do I separate pages of a pdf into separate pdf docs?

    How do I separate pages of a pdf into separate pdf docs?

    Go to the tools>pages and use extract pages. There are several options available.

  • How do I insert pages from one PDF into the current PDF in Acrobat X?

    I just upgraded from Acrobat 8 to Acrobat X.
    How do I insert pages from one PDF into the current PDF in Acrobat X pro?  I was able to do this from the Edit menu in Acrobat 8 pro.  Appreciate instructions.  Thanks.

    Hi chemadberk,
    In my Acrobat 8 Pro, Insert Pages is under the Document menu but anyway...
    In Acrobat X, click on the Tools pane(upper right side) then navigate to Pages- the Insert Pages commands are located there.
    Hope this helps,
    Dimitri
    [signature deleted by host]

  • Limiting shown buttons when opening 3D PDF in acrobat reader

    Hi guys.
    I want to create a 3D PDF to be viewed on the web. I don't think that all buttons(rotate, spin, pan, zoom, etc.) in the 3D toolbar are necessary so I would like to choose which buttons will be shown when the user click where it says
    "Click to Activate 3D"
    Is there a way t do this? If so, is there a way to lock those so the user cannot activate them?
    Thank you.

    Hello,
    There is an option to manage display of the 3D toolbar whichi only available at the creation of the 3D PDF file (within Acrobat Pro Extended only..):
    Go to Edit/Preferences
    Select a 3D format then press Edit Settings
    Under 3D Panel there is a check box called "Show 3D toolbar by Default" Unselect this option then press OK.
    Convert a 3d file to PDFthen save the file
    Open the PDF within Acrobat Reader or Acrobat Pro Extended, the 3D toolbar will not be displayed after activating the 3D content..
    Hope this can be helpful
    Best Regards
    William Gallego
    A3D QE Team

  • How do you edit document text in pdf in Acrobat Pro 11 Mac?

    How do you edit document text in pdf in Acrobat Pro 11 Mac? I know I can do it in the Windows version, but can't find same tool in Mac.

    Should be the same but it isn't. I have included a screenshot of my tools choices in both my Mac and PC versions - they are totally different.
    Mac version
    PC Version

  • Cannot email pdf using Acrobat Reader XI v11.0.3 in Windows 8. No problem when using in ms vista. ge

    Cannot email pdf using Acrobat Reader XI v11.0.3 in Windows 8. No problem when using in ms vista. get "authentication error". Sometimes will get a very quick dialogue box showing the gmail login screen but then disappears. I use firefox and IE

    Hi Rodney
    Welcome to Apple Discussions
    This sounds like one of those "oddities", contributed to by a few sources.
    I can clear the Safari cache files as a temporary solution, but I encounter the same difficulties with the “problematic” files once they have been opened again.
    Wondering if you disabled the Safari Cache would the refresh function work correctly? As a test you can disable the Safari Cache by Emptying the Cache first via the Safari menu, then Quit Safari. Now go to the Finder>Your User Library>Caches>Safari. Single click on the Safari folder, then Apple Key + I to open Info panel. There, check the "locked" box. This prevents further additions to the cache. The downside, you lose your ability to upload images etc. within Safari (my cache is disabled, so I use Firefox for the uploads).
    Then restart Safari. Try the PDF from within Safari.
    Post back

  • I am trying to drag and drop one page of a .pdf into another .pdf in Acrobat Reader.  I used to be able to drag and drop from one .pdf to another.

    I am trying to drag and drop one page of a .pdf into another .pdf in Acrobat Reader.  I used to be able to drag and drop from one .pdf to another.

    If you could drag and drop pages before, it wasn't in Reader. You no doubt had Adobe Acrobat (Pro or Standard) which shouldn't be confused with Adobe Acrobat Reader. They recently added Acrobat to the name of Adobe Reader so the confusion about which product you had and/or have is understandable.

  • JDO : how to map a byte array field correctly

    Could someone please provide an example on how to correctly map a byte array field in a PCClass.
    The field should be mapped to a BLOB field in my Dictionary project.
    The checker keeps throwing errors during the enhancement process. Tried all sorts of combinations of xml in my jdo and map file (using the dtd) but I still haven't found the solution. The compilation works fine though, it is only the checker that complains.

    You're already in a PDF open in Acrobat (not the free Adobe Reader) and you've made a new PDF? Which you want to save to disk and reopen?

  • How to open pdf in Acrobat Reader in Firefox window/Tab when both Acrobat Pro and Acrobat REader are

    I would like to open pdf files in firefox using Adobe Acrobat Reader.
    I have both Acrobat Pro or whatever its called and Acrobat Reader installed.
    Presently going to firefox's tools, options, then selecting the file types option I cannot select any plugin to open my pdf's besides what's labeled as "adobe acrobat" but which executes an in-tab instance of Adobe Acrobat Pro, despite the ambiguous language on the plugin which I suspect stems from Adobe's evolving and confusing conventions regarding just what Adobe Reader, Adobe Acrobat, Adobe Acrobat Reader, and Adobe Acrobat Pro really is.
    Anyways, how to make pdfs open in-tab instances of Adobe Acrobat Reader while I have both the Reader and the Pro installed?
    Is there a sepperate plugin I need or something?
    Any help is very Appreciated

    eh,
    The problem w/ acrobat is that it takes forever to load
    I was going to just use reader to read documents, and acrobat to edit, so I could gut reader of all the plugins worthless for 99.9999 of pdfs I use and it'll load fast.
    foxit is nice, but won't open in-browser despite their continuing claims of supporting this feature.
    That's so bizarre that adobe won't allow you to choose which one you want to run. Its installed as sepperate programs on the uninstall list, on the "open with" context menu, and w/ file associations, so why would it not be possible to only open pdf links w/ one?
    Maybe its time to abandon acrobat and just use reader. There's much cheaper programs w/ all the same functionality as acrobat, so I guess I'll move on to those.
    If anyone else has suggestions feel free to make em.

  • How can i store bytes array in MS ACCESS???

    Hi,
    i m making small project using Ms Access as a dataBase.
    In which i am encripting some confidential data say ACCOUNT_NAME and storing it into MS Access in encripted form........
    The problem is encripted data is in bytes array n how can i store it into MS access ??? is there any data type similar to BLOB in Ms Access ??
    please help me................
    i had searched net for this but till now not found any useful info :(

    You can try:
    binay type (JET3 255 bytes,JET4 510) Types.BINARY
    ole type (0~1 G) Types.LONVARBINARY
    You can use Text (JET3 255 bytes�CJET4 510bytes) Types.VARCHAR if you use base64 encoding for
    ACCOUNT_NAME column.

Maybe you are looking for