How do I view a PDF?

I have an applet that serializes a transport bean to a servlet on tomcat, the servlet makes a PDF that I want to display on the browser. I had thought that if I simply set the MIME type and return the binary data, the browser would know what to do. But I forgot that in this case the applet is the one in control, not the browser. The browser screen just sits there.
Here is the code that I use to send the serialized object :
    public InputStream sendPostMessage (Properties args) throws IOException
        String argString = "";  // default
        if (args != null)
            argString = toEncodedString (args);  // notice no "?"
        URLConnection con = servlet.openConnection ();
        // Prepare for both input and output
        con.setDoInput (true);
        con.setDoOutput (true);
        // Turn off caching
        con.setUseCaches (false);
        // Work around a Netscape bug
        con.setRequestProperty ("Content-Type", "application/x-www-form-urlencoded");
        // Send headers
        sendHeaders (con);
        // Write the arguments as post data
        DataOutputStream out = new DataOutputStream (con.getOutputStream ());
        out.writeBytes (argString);
        out.flush ();
        out.close ();
        return con.getInputStream ();
    }

Here is the question...
Given the fact that I am serializing an object to the servlet, and that the applet is sitting there.. Is there a way to make the Browser display the PDF?
I have my doubts about ShowDocument(URL) as I am generating the PDF on the fly without using a temporary file. (Jasper reports) In addition, aren't there sandbox issues on the server side for creating a file?
Any other ideas?

Similar Messages

  • How can I view a PDF file on my IPad? I only get the first page.

    How can I view a PDF file from my Ipad, both in email and Internet links? I only get the first page.

    Support for viewing PDFs in emails and web-pages is built in to the iPad. You need not have bought an app for that.
    There are PDF apps that provide more features than the built-in functionality, but for basic viewing of multi-page PDFs no app is required.

  • My safari won't let me view a pdf link, nor can I save it as a document. How can I view these pdfs and links?

    My safari won't let me view a pdf link, nor can I save it as a document. How can I view these pdfs and links?

    Have you installed Adobe Reader and its associated plugin? AFAIK, that's the preferred if not the only way to open PDFs in an embedded view within Safari.
    http://get.adobe.com/reader/

  • ~~~how can i view a pdf file in a servlet?~~

    hi..
    i just need to view the .pdf files in a servlet page.all the pdf files are stored in my web module(i am using the glassfish server).can anybody tell me how to do it?
    thanks a lot....

    Provide a link? I mean, linking a PDF in an HTML page is hardly a Java programming problem.

  • How Do I view a PDF in Firefox?

    It seems that ever since I downloaded Adobe Acrobat XI Pro from here I have not been able to view and download PDF files from Firefox. It works fine in Safari but I need it to work in Firefox as well. I have version 16.0.2 of Firefox and I'm not sure if it's my plug-ins and/or extensions settings or what that is not allowing me to view files within the browser. Any information on how to resolve this would be really appreciated!

    Open the Preferences dialog in Firefox and choose the Applications tab. In the list of applications you should see Adobe PDF document. Click in the Action column for it and you should be able to set it to Use Adobe Acrobat Pro.

  • How can I view a pdf file without downloading it? It seems I can't get rid of the download option. Is it possible to do this without downloading the pdf and then viewing it?

    I would like to open up a pdf file in adobe acrobat or adobe reader directly from an attachment or web page, but don't want to download it to my computer. Can I do that?

    Hi Goin crazy 2,
    If you purchased the song twice in error, contact the iTunes Store and they will review your account for a refund:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    Find the email receipt for your purchase.
    Click Report a Problem under the app that is having the issue.
    When prompted, enter the Apple ID and password you used to purchase the item, then click Report a Problem.
    Click Report a Problem next to the item you are having an issue with.
    From the Choose Problem dropdown menu, choose the appropriate issue.
    Follow the onscreen instructions and—if prompted—type a description of the problem into the text field.
    Click Submit to have your issue reviewed
    I hope this information helps ....
    Have a great day!
    - Judy

  • How do I view a pdf files online within the body of the browser

    I am having some issues interacting with pdf documents online with a website called Equator.com. I am using the latest version of of Firefox (10.0) and running Mac OS Lion. What can be done to remedy this problem?

    Hi richardconte,
    Have you looked at the Knowledge Base article [[Opening PDF files within Firefox]]? First you will need to install a PDF Plugin. Then you'll need to tell Firefox to open the PDF file in the browser. The article covers all of this information and provides troubleshooting steps in case you run into any issues.
    Hopefully this helps!

  • How do I view PDF files from a website link on my iPad?  I already downloaded the free PDF reader ap.

    How do I view a PDF file that is a linked on a web site using my I pad?  I already downloaded the free PDF reader ap.

    When you tap on the PDF link, the file should open directly on the screen while you are in Safari. You can then tap on - Open In - in the upper right corner of the PDF. Then tap on Open In and select your PDF app from the pop up.
    If you do not see the Open In button, just tap on the open PDF somewhere and that will make the button reappear for a few seconds.

  • I can't view the pdf files from outside without open them

    i had the adobe acrobat 7.0 version 7 installed on my pc
    when i upgraded it to version 9.0 , I can no longer see the cover of pdf files
    how i can view the pdf files from outside without open them
    please notice the divergence between these picture
    before
    after

    the problem becouse my windows is 64 bit
    i found a fix file , i try it and it works
    download
    http://www.pretentiousname.com/adobe_pdf_x64_fix/#downl

  • I am trying to view pdfs but when i click on them lots and lots of tabs keep appearing at the top i've had 1000s,how can i stop this and how can i look at pdfs

    I received an email from my power supplier,in it I must click on bill to view,it downloads and asks if I want to open it with internet explorer or something else,so I click on firefox.All it does is keeps opening loads and loads of tabs across the top,I've tried to close them at the last count I had managed to close over 1000 tabs but still cannot see my bill.my wife had the same she tried to open pdfs and got the same problem.So how can we view without problems files we receive in emails etc,and how do I get rid off this tab multipling itself? Thanks

    hi thanks for that info,but I tried the first help email I received and that one did the trick.Tahanks again for your in put.

  • Does anyone know how i can view PDF files using Galaxy Note 2?

    Does anyone know how i can view PDF files using Galaxy Note 2?
    This is what i have been doing;
    I click on the file i wish to view (via a portal)
    this file goes to notification widget (i drag down screen)
    notification/message says download complete
    i click on notification/message
    nows it says complete action using (here i only have 2 icon options 1= DB Text Editor 2 = HTML Viewer)
    I have installed Adobe Reader.

    Can you confirm if the downloaded file is a pdf file, that is it ends with .pdf?

  • How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.

    You can prevent it from being printed by applying a security policy to it
    in Acrobat. The rest can't be prevented, unless you spend  a LOT of money
    on DRM protection.

  • I am unable to open pdf files in firefox, and I have tried all the solutions proposed by others. How can I re-enable pdf viewing in firefox?

    I have recently switched to Firefox from Google Chrome, and I am finding that I am unable to open any pdf files from the web in any way in Firefox. I cannot download them and open them in Adobe Reader, and I cannot preview them in Firefox, nor can I use the Adobe plugin. I have tried to use the solutions posed by users on this site, but none of them have worked. Any time I make a change to settings to try to solve this issue, the change never allows me to view the pdf file, and the setting reverts to the previous setting after the browser has been restarted. I don't care how I view the file, but I need to either be able to view it as a preview or I need to be able to download it.

    I don't know if this is any help I have had a problem where the pdf files were not opening correctly which I think was the problem here. I spent hours of head scratching and have now found out what the problem is. Right click on the Adobe Reader Icon on the desktop. Select properties and then the compatibility tab. You will see the uppermost section in this screen is Compatibility mode. I have Windows 7 and mine was set to Windows XP. I changed that to Windows 7 and now the problem is resolved. In short use the above instructions to check you are using the right compatibility mode for the version of Windows you are using and your troubles should be over!!

  • HOW DO I VIEW PDF FILES IN SAFARI 5.1.7

    HOW DO I VIEW PDF FILES IN SAFARI 5.1.7?

    I had the same problem... I have installed PDF Browser Plugin Version 2.4.4, and it works very fine !
    http://www.macupdate.com/app/mac/9542/pdf-browser-plugin

  • How do I view PDF files on a website without actually downloading them?

    Whenever I encounter a PDF document on a website, it always downloads to my computer when I view it. Consequently I am getting left with all these documents that have been downloaded to my computer that I don't want to save, only look at once. It is a real pain to have to go back and delete all these files, some of which have obsure nondescriptive names, after I am done. How do I view but NOT download??

    When you tap on the PDF link, the file should open directly on the screen while you are in Safari. You can then tap on - Open In - in the upper right corner of the PDF. Then tap on Open In and select your PDF app from the pop up.
    If you do not see the Open In button, just tap on the open PDF somewhere and that will make the button reappear for a few seconds.

Maybe you are looking for