Viewing and printing a PDF file from Java Swing Application

Hello,
I need to view and print PDF files from Java Swing Application.How do I do that?I appreciate your help.
Thank you
Sumana Somareddy

If you have a link to the URL pointing to the PDF file, you can allow the browser to open it. Then use the print function of the browser to print the PDF document.
Regards,
Tak.

Similar Messages

  • Opening a PDF file from a swing application in MAC

    HI everyone,
    Actually I am developing a swing application which should be executable in both windows and Mac (even other) platformes. In my panel I have an icon which leads to a pdf file. I saw in the following thread:
    http://forum.java.sun.com/thread.jspa?forumID=17&threadID=617767
    that we can use
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + file);to open what ever file in windows. I want to know what should I do if this application is running on Mac or Linux! I have never worked with these OS so I do not have any idea how to resolve the problem.
    Can anyone help me with this matter?? That would be really nice of you to reply :)
    Thanx and have a great day.

    Thank you for replaying so soon..
    Well you are right by using a widget and etc.. but the problem is that I have been told that this application should open a PDF file that has bookmarks to each chapter of the text and one can make a search on this text by using pdf search.. So I do not have any other choice than opening a pdf :D and my time is unfortunately limit.
    For solving the problem that the user may not have PDF reader.. well I have been told that user should install the pdf reader, so in my application package I am putting the installation file of PDF.
    But going back to my problem.. I guess is someway I have to get the OS type of the user and I have to do a SWITCH or something on the OS type and then change the content of the Runtime.exec(). But the question is how can I get the OS type and what should I change in Runtime.exec().
    So now any idea? any solution??

  • How to open an PDF file from Java Application

    Hi
    I am developing a GUI application in java swing.
    on clicking one button, I want to open PDF file from my swing application.
    Is there any API through which I can achieve this?
    Tapan Maru
    Sun Certified Java Programmer

    Here's a way to do it (if I understand you
    correctly). Just let explorer.exe do it for you.
    import java.awt.*;
    public class openPDF
         Desktop desktop = Desktop.getDesktop();
         public openPDF()
              open("test.pdf");
         public void open(String path)
              try
                   Runtime.getRuntime().exec("explorer.exe "+path);
    } catch(Exception e) { System.out.println("NAI!
    I! ERROR!\n"+e); }
         public static void main(String[] args)
              openPDF myApplication = new openPDF();
    Why do you have a Desktop object as a member but instead of using it, you execute a command with Runtime (which is not platform independent!)???
    -Puce

  • The printing of .pdf file from Project 2013 stops when the file name should be written. Project 2013 crashes. Does someone know what is wrong between Project 2013 and Adobe Acrobat 9?

    The printing of .pdf file from Project 2013 stops when the file name should be written. Project 2013 crashes. Does someone know what is wrong between Project 2013 and Adobe Acrobat 9?

    The Acrobat 9.x product family passed into "End of Support" mid-year of 2013.
    Acrobat 9 support of MS Project via PDFMaker stops with Office 2007.
    For Office 2013 support you must use Acrobat XI (11.0.1) or newer. 
    A good to have reference:
    https://helpx.adobe.com/acrobat/kb/compatible-web-browsers-pdfmaker-applications.html
    Acrobat Pro and Standard DC are what are currently available for purchase. 
    Be well...

  • How to Print  a PDF file from within a ABAP ( from gui input)

    Hi champions,
    This is Client requirement:
    "We need to print a PDF file from within a ABAP"
    We first need to test whether it is even feasible, and then if it 
    is, then write a small test ABAP which can accept a PDF file
    name as input (from GUI) and then print it to a SAP print
    device (printer).”
    Please Can any body help me on this.......
    It's urgent
    Thanks
    Basu

    Check following blog for PDF output from SAP
    /people/thomas.jung3/blog/2005/04/28/setting-up-an-adobe-writer-for-abap-output
    anya

  • Print a pdf file from sap

    Hello,
    I'm looking for a way to print a .pdf file from sap . The file  was created manualy and is in a newtwork folder.
    I have to send the print to a network printer . Is it possible to use the AcroRd32.exe as a command line?
    Thank you.

    hii,
    try this
    CONVERT_OTFSPOOLJOB_2_PDF
    http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm
    PDF - Printing a PDF file from ABAP or SAP Script
    regards,
    Sri.

  • Using Acrobat X and creating a PDF File from EXCEL 2010, I notice that the Pagination restarts at 1 for each Worksheet included in the PDF.

    I use Acrobat X Standard and created a PDF file from two or more worksheets using EXCEL 2010.
    The resulting PDF file restarts the PAGE # (In header/footer settings of Excel) at 1 for each worksheet.
    However, a colleague of mine who has Acrobat X Pro version, using EXCEL 2010 and same exact file does the same task, he gets a file that starts at page 1 and second worksheet continues the page # from the last page of the First worksheet.
    We both are using the ACROBAT menu (not the print to Adobe printer) to create the file so that we can get Bookmarks included in the resulting file for each worksheet.
    We cannot figure out any option in Acrobat's preferences that controls the pagination on either of these versions of Acrobat.
    So is this just a feature that works one way in Standard version and another way in the Pro version, and the user has no control over it?

    This is so sad. I read your comments and I said, "Huh?" Haha!
    I tried the indexed color option and it did make the final file smaller. Around 600KB. But there's probably another way to make it even smaller like the gazillion-paged pdf file that I mentioned that was only about 300KB.
    And by saying a layout program, does that mean like Adobe InDesign? Does that mean that I should just make my graphics in Photoshop and then import using another program and finish the file there?
    What other layout programs can I use?
    Thank you so much!

  • How do I print a pdf file from windows 8?

    I can't find a command to print a pdf file. I'm working with windows 8. can anybody tell me how do I find that command?

    Please see FAQ: How to print a PDF file from Adobe Reader Touch.
    Starting from version 1.1, Adobe Reader Touch supports printing.
    If you do not see the Print button in the toolbar, you have an older version of Adobe Reader Touch. Please download and install the latest version of Adobe Reader Touch via the Windows Store.

  • Can I print a pdf file from my phone?

    Can I print a pdf file from my phone

    Hello Carmen1390,
    It sounds like you would like to print from your phone directly to a printer. This feature is called Airprint and your printer would need to support that function. Here is some more information on Airprint along with a list of compatible printers:
    AirPrint Basics
    http://support.apple.com/kb/ht4356
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Issues with printing PDF files from an ADOBE application

    When printing PDF files from an Adobe application, some of the characters are lost and do not print. What can I do?

    Please don't post the same question multiple times!

  • How do I download and print a pdf file in osx mountain lion

    How do I download and print a pdf file?

    control click on your PDF to download option
    Open it on your desktop Command-P is the short cut for print option.

  • Help - "Acrobat is being used by another application and cannot open PDF files until the other application is closed."

    Hello,
    I searched this site and google for this error terminology and come up dry.  I support a user who has been for years using Acrobat 5 (yes, I know...) to read files in a client DB program, as well as other PDF files on their PC.  In the last week or so, they have started gatting this error "Acrobat is being used by another application and cannot open PDF files until the other application is closed." any time they attempt to open a PDF file attached to an email (via Outlook).
    It is my understanding that they cannot upgrade to a newer version of Acrobat because of limitations of their client software, but had not previously had any issues viewing PDF notes from the DB, and PDF attachments in their email.
    I have tried uninstalling and re-installing, as well as tried using Adobe Reader 7 & 9 in conjunction with Acrobat to try to get around this issue, but have not been successful.
    Any ideas?
    Thanks,
    Jesse

    I don't have an answer to your technical problem. The product I assume is Acrobat that you are talking about (based on the post title), Adobe is the company name. This is a good place to ask questions on Acrobat if folks can figure out what you are talking about. They will ask for the product version number (like AA9.3.3), operating system, and other applications if appropriate. Also, just what you are doing that generates the message.
    As for Adobe, you are not likely to get an answer from them here in the user forum. You will be lucky if you can get an answer if you can contact them and not be on hold for more than an hour (sorry, this is why a lot of folks end up in the forum).
    So, to help others try to answer your question, what are the products and versions involved? What OS? What are you doing when the message comes up.

  • How to move PDF file from Spool to Application Server?

    How to move PDF file from Spool to Application Server?
    Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
    RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
    The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.

    Hi Gemini ,
    Please refer the below links.
    [http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
    [http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
    Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM

  • How to invoke a JAR from Java Swing application?

    Hi,
    I am trying to start a jar file from the swings application.
    I am trying the following code,
    String cmd[] = new String[]{"cmd", "java -jar TestJFreeChart.jar"};
    try
           Process run = Runtime.getRuntime().exec(cmd);
    catch(Exception e)
    {}Is anything wrong in the usage?

    First try:
    "cmd /c java -jar app.jar" or cmd start, because it can't jsut run java.exe, it needs to be
    passed to the cmd interpretor witch further calls java.exe, etc
    Also read what stevejluke suggested. Its important to know if .waitFor or not.
    You wont understand these until you read the tutorial.

  • Printing of PDF files from Unix and Linux

    Hi
    I am looking for a product (free or commercial) that can print PDF files from Unix (HP-UX, AIX) and Linux system. It must have similar features to the Windows Adobe print driver like setting margins, re-sizing, size to fit, etc.
    Thanks
    Gil

    Hi Gil,
    For HPUX and AIX Adobe Reader 7.0.9 is available for download.
    For Linux and Solaris, the latest version available is Adobe Reader 8.1.2.
    You can download the installers from :
    http://www.adobe.com/products/acrobat/readstep2_allversions.html
    Regards,
    Rishi

Maybe you are looking for