How to read,dispaly and open pdf files

Hi, I am very new to Java butI have VB6.0 background. My current requirement is to read pdf file names from a directory, then
show them on a form in a list (with their path in background pointing to the actual pdf files) and then once a user clicks any
file name, open that file on the form.
For example:
My pdf files are in a directory as following:
C:\myreports\user1\
report1.pdf
report2.pdf
report3.pdf
C:\myreports\user2\
report1.pdf
report5.pdf
The output on the form should look like this if user1 has logged in the system. Side note: I am able to get userid of the logged in person in a variable.
My Reports:
. Report 1
. Report 2
. Report 3
When a user clicks Report 1, it opens on the same form in pdf format.
Thanks
S.yhong

For the first part (Listing thepdf files in the directory) you can use the java.lang.File class.
File f = new File("path to your directory");
File files[] = f.listFiles();
then process the files array to find the files with extenction pdf
You can also use a file filter object and make the listFiles method return only the pdf files.
Please read the documentation about the File class for more info about it.
*/ For the displaying the pdf part is it good enough if you load the accrobat reader and with it. In that case you can do that using the Runtime.exec
Also you can search for free java based pdf viewers I am sure there must be meny.
And also the JTextPane might support pdf but I am not sure about it.
EDIT:
Just to say that this is my 1000th post :)
Message was edited by:
LRMK

Similar Messages

  • How do you download and open PDF files that come in the email?

    I can NOT download or open PDF files. It prompts me to open in IBooks and then it's not there. I am so frustrated. PLEASE HELP!

    Touch the attachement once to download it.  Then touch it a second time, after it is downloaded ( watch the attachment icon) to open it in quick view. if you want to do something more than just view it, and if you want to save it,  Touch and hold the downloaded attachment to get the 'open in' pop up, and any app that supports PDFs, like I books, or any of the other PDF ready apps.
    If it is not downloaded yet, it will not be in I books.

  • How to embed and open PDF files within excel

    I constantly need to embed PDF files onto Excel documents as well as extract/open/view PDF files from Excel documents. I am unable to do so with a macbook, i know that there is a workaround but it's such a tedious process. Is there a software i can buy or setting that i can do so that i can embed and open PDF files easily as i need to view these files multiple times a day for work.
    please advise

    Download and install Adobe Reader: Adobe Reader Install for all versions
    Open the PDF file using it. If security restrictions don't prevent it you could also print it.

  • How come pages won't open PDF files made by Pages?

    How come pages won't open PDF files made by Pages?
    I have files I made with Pages and exported as PDF but I can't open them with pages to edit?
    Also, where are the recent files created by pages located? Can't find those to open either..

    Hi Tom,
    I was delighted when I signed up for Pages. Clunky yes, but it worked. I've been a graphic designer on a Mac for 25 plus years and have logged too many horror stories of "upgrade" wars which cost me massive lost time, data and money forcibly extracted just so I could finish a project.
    When I first used Pages in April of 2012? or there about, I was able to open Word documents exported to .pdf format, emailed to me, which I then dragged into Pages. I could make the changes I needed to make, export as a .pdf, return it back to my client which they could then edit on whatever it was they were using. I'm not a neophyte with this. I've had Original Photoshop as a stand alone, Quark (which locked users out 6 months after I purchased it.) Quark again, Freehand, Pagemaker, Illustrator, Photoshop again, Creative Suite for several upgrades, Acrobat Pro. 2 years ago I lost 6 years of Quicken data and had to and "upgrade" start over. This last go around I  had to "upgrade" my Apple ID - yes I had 2 on purpose, lost my Pandora One and my ability to get into the Tulsa County Library website.
    At this point, I'm retired and feel like what I've paid for in the past should WORK today. I have a 100+ page cookbook in Quark which I was able to export as a .pdf, that I've lost the tags too, Easier to start over. I have artwork that is hundreds of megs in Photoshop. Not the least bit interested in anybody's "cloud".
    Thanks for letting me vent. I'm determined to keep my equipment and software up to date so I can enjoy the skills I've acquired, but I completely cringe at Apple's antics. I truly hate it when I have to respond to some new "tip" or product offer. BooHiss. Happy Turkey Day. Pages is a "turkey" program.
    Best regards, mbd

  • How do i view and print pdf file in mac osx with ff4.0?

    How do i view and print pdf files in ff 4.0 on a mac with osx. for some reason the updated ff version does not support it. Makes no sense that something that worked in an earlier version now does not...
    Thanks,
    Ron

    Please don't post the same question multiple times!

  • Adobe Reader doesn't open .pdf files anymore. Error: 213:11.

    Adobe Reader doesn't open .pdf files anymore. It's written Error: 213:11. Details: laptop with Windows XP, Adobe Reader X

    Are these local or online documents?  If online, in what browser?  If local, does the documents folder and docs themselves have sufficient permissions?
    Is there anything else beside the number 213:11?

  • I am programming a DVD-Rom in DVD Studio Pro 4 and need to display and open pdf files, any suggestions?

    I am programming a DVD-Rom in DVD Studio Pro 4 and need to display and open pdf files, any suggestions?

    http://documentation.apple.com/en/dvdstudiopro/usermanual/index.html#chapter=22% 26section=9%26tasks=true

  • Adobe reader will not open pdf files I have saved as, or, export as pdf to my desktop (latest Maverick). The same file does open when I am on the source website (i.e. user manuals etc.). Why?

    Adobe reader will not open pdf files I have saved as, or, export as pdf to my desktop (latest Maverick). The same file does open when I am on the source website (i.e. user manuals etc.). Why?

    iMac G4, Mac OS X (10.4.9)
    Make sure you have the latest Adobe Reader installed for your OS.
    http://www.adobe.com/support/downloads/product.jsp?platform=macintosh&product=10
    Did you try using Preview. If you control click on the PDF on your desktop you can use the "open with" option.

  • In C#, how can I detect an opened PDF file and save it into disk?

    he WebBrowse componente in C# opened an PDF file inside. The file came from the Internet. So, the Adobe Acrobat Reader was called and opened the file correctly. I want to save this file to disk. How can I do it?
    The WebBRowse component does not have access to the PDF content.

    PDFs are not designed to be editable. Your engineers can make comments using Adobe Reader without any extra steps provided they use the highlight and sticky note comments. If you want them to have access to the full range of comment markup you will need to use Acrobat to apply extended rights to the file.

  • RE: [Adobe Reader] when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? i

    HelloThank's for your helpsI hope this document is helpfulBest Regards,
    Date: Sun, 22 Jun 2014 17:10:17 -0700
    From: [email protected]
    To: [email protected]
    Subject:  when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help me th
        when i open pdf file it open all the pages but some pages give error massage (there was error processing a page,there was a problem reading this document 110) but if i open this page which give me error with google chrome it's work ? if you can help m
        created by Anoop9178 in Adobe Reader - View the full discussion
    Hi,
    Would it be possible for you to share the document?
    Regards,
    Anoop
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6485431#6485431
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
         To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Adobe Reader by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

    thank's for reply and your help
    i did the step's that you told me but  i still have the same problem
                                     i have the latest v.11.0.7
    i
    i disable the protected mode

  • I've tried all the advice on the Firefox Help site, but I still can't download anything. Yesterday, I was able to download and open PDF files fine. Today... no.

    While I was working on my Mac last night, I got a message that I needed to download an Adobe (I think an Acrobat X Pro) update. I did. That seems to be the time when I started having problems. Now I can't use the uninstaller for the program. I think that may be the problem, but my ability to fix it stops here.
    I'm usually more discerning about updates, etc, but I was working on a project and the flashing updater was bothering me, so I hit yes, not really looking at the app I was updating. Ugh. My mistake.

    Hi hobanny,
    Have you looked at the [[Opening PDF files within Firefox]] Knowledge Base article? There is a lot of useful information in there. It actually lists two different plugins to try for opening PDF files. I'd try both of them just to be safe.
    Hopefully this helps!

  • How can I store and share PDF files via iCloud?

    I am trying to use iCloud to store and share PDF files from my PC, iPad2 and iPhone 4S... They are supposedly supported. I can share .docs, .xls, etc.... However, I cannot figure out how to share a pdf!

    Welcome to the Apple Community.
    You can download an iWork document from iCloud as a PDF, but you can't share a PDF document with iWork apps on iOS devices.

  • Why Acrobat Reader doesn't open pdf-files from Safari?

    I'm new Mac user and cannot find answer why I cannot open pdf-files directly from Safari. My Macbook OS X 10.9.3 and Safari is 7.0.4. Only way to open pdf-files is to download the content first and then open it. If I try to open it directly Acrobat says "Before proceeding you must first launch Adobe Acrobat and accept the end user license agreement". I have downloaded Acrobat Reader several times already and cannot understand what I'm doing wrong.

    Back up all data before making any changes. Please take each of the following steps until the problem is resolved.
    Step 1
    If Adobe Reader or Acrobat is installed, and the problem is just that you can't print or save PDF's displayed in Safari, you may be able to do so by moving the cursor to the the bottom edge of the page, somewhere near the middle. A black toolbar should appear under the cursor. Click the printer or disk icon.
    Step 2
    There should be a setting in its preferences of the Adobe application such as Display PDF in Browser. I don't use those applications myself, so I can't be more precise. Deselect that setting, if it's selected.
    Step 3
    If you get a message such as ""Adobe Reader blocked for this website," then from the Safari menu bar, select
              Safari ▹ Preferences... ▹ Security
    and check the box marked
              Allow Plug-ins
    Then click
              Manage Website Settings...
    and make any required changes to the security settings for the Adobe PDF plugin.
    Step 4
    Triple-click anywhere in the line of text below on this page to select it, the copy the selected text to the Clipboard by pressing the key combination command-C:
    /Library/Internet Plug-ins
    In the Finder, select
              Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens by pressing command-V, then press return.
    From the folder that opens, move to the Trash any items that have "Adobe" or “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari.
    Step 5
    The "Silverlight" web plugin distributed by Microsoft can interfere with PDF display in Safari, so you may need to remove it, if it's present. The same goes for a plugin called "iGetter," and perhaps others—I don't have a complete list. Don't remove Silverlight if you use the "Netflix" video-streaming service.
    Step 6
    Do as in Step 4 with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari.

  • Rusty Solomon : Adobe Reader Error while opening pdf files

    Hello everyone,
    I have a systematic error opening PDF files with Adobe Reader X (10.1.1)
    "Adobe Reader has encountered a problem and needs to close. Please excuse us for the inconvenience."
    By waiting I installed Foxit but I would understand.
    I uninstalled Adobe and reinstalled but it's still the same.
    Thank you for your answers in advance
    Rusty Solomon

    First I would try to update to 11.1.8.
    If that does not fix it, tell us your operating system.

  • Adobe reader won't open pdf files

    I was hoping someone can help. I have Windows XP, and I use Firefox as my web browser. I have installed Adobe Reader, and when I click on a pdf link, in the lower left field of the screen it reads as follows: 'connecting, waiting, stopped' it repeats this over, and over, and over. I eventually have to right click and save the link to the desktop, but this is becoming entirely too frustrating........I have since uninstalled Adobe, and re-installed it, but nothing changed. I even uninstalled Firefox and re-installed, but to no avail.
    If anyone has a fix, I am open to your suggestions.
    Thank you.

    Jeff
    Have a look here:
    http://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox
    (http://preview.tinyurl.com/5a6klx)
    it's probably an issue with the Firefox plugin for Adobe Reader.
    John

Maybe you are looking for

  • Sales order need to be blocked for delivery while creation

    Hi experts,                 My requirement is to block sales orders for delivery, for the selected distribution channels, and for selected countries while creation itself, so for this I came to known that a program MV45AFZZ include, here in this at w

  • BI Publisher report bursting problem

    I am not able to make my report burst to separate files for ftp delivery. I am running BI Publisher version 10.1.3.4.1 (stand-alone). My data query looks like this: select a.agency_id, b.borr_name from agency_tbl a, borr_tbl b where a.rpt_date >= 201

  • I have an issue using Lighting Effects in Adobe Photoshop CC 2014

    Hello everyone, I am having issues using Lighting Effects in Adobe Photoshop CC 2014. I created a duplicate layer that I want to do the effects on, converted it to a smart object and on that same layer went to Filter>Render>Lighting Effects  to get t

  • Dvd Rom Problem

    Hi, I have a Ibm Thinkpad T23 Series Laptop where I bought from Canada last year. When I was in Canada I am able to access any of the CDs/Dvds through my Thinkpad's  Dvd rom. My Dvd Rom would be  TOSHIBA - DVD 8X MODEL NO : SD-C2512. I have recently

  • Unable to find a qualifications catalog for the root object specified-ESS

    Hi SDN, We are getting following exception Unable to find a qualifications catalog for the root object specified   when click on Add New Skill in Skills Profile, ESS . It is working fine , if user is assigned sap_all role. This is issue with permissi