How to open a pdf format file in Java

I want to store the absolute path and filename of some .pdf file in access database, how can the user retrieve the path and filename? I don't know how to display it on GUI or start the acrobat reader to show it up. One more, can I store absolute path or filename in access database? can anyone give me some solutions? any help would be appreciate!

openPDF() throws Exception{
//path of acrobat
String acrobatPath = "c:\\Program Files\\acrobat\\AcroRd32.exe";
// path of pdffile
String filePath= "c:\\help\\Help.pdf";
// pdf file is the argument for the reader.
Runtime.getRuntime().exec( acrobatPath + " " + filePath);

Similar Messages

  • How to open a stored text file using java???

    Respected Sir / Madam
    I have a JList containing absolute path of files stored in my operating system in String format....I have added a ListSelectionListener...Now when i select an absolute path in the JList, the file should open ....I don't know how to do that....Hope you got my problem....Can any one pls help me out???
    Thank you[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    thats ok buddy! best of luck
    U need to import
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    public void valueChanged(ListSelectionEvent e)
    if (!e.getValueIsAdjusting()) {
            String fileName=
              optionList.getSelectedValue().toString();
    final JFrame dialog = new JFrame(fileName);
              JEditorPane viewer = new JEditorPane();
              viewer.setEditable(false);
              JScrollPane jsp = new JScrollPane(viewer);
              try {
                   viewer.setPage("file:/" + fileName);
              } catch (Exception e) {
                   viewer.setText("Error opening " + fileName + ": " + e);
              dialog.getContentPane().add(jsp, BorderLayout.CENTER);
            JButton closeButton = new JButton("Close");
            closeButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    dialog.setVisible(false);
                    dialog.dispose();
              dialog.getContentPane().add(closeButton, BorderLayout.SOUTH);
              dialog.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
              //dialog.pack();
              dialog.setSize(600, 600);
              dialog.show();
    }

  • How to open a pdf file using OPEN DATASET

    Im trying to convert a pdf into binary format. So im trying to read the contents of the pdf into a XSTRING. Using the FM 'SCMS_XSTRING_TO_BINARY' i can convert the XSTRING to binary format.
    How to open a pdf file using OPEN DATASET and transfer its contents in a XSTRING variable.
    What i've tried is....
    DATA: f_name type string value 'C:\rep_output_pdf.pdf',
          x1 type xstring,
          LT_DATA TYPE STANDARD TABLE OF X255.
    OPEN DATASET f_name FOR input IN BINARY MODE.
    READ DATASET f_name INTO x1.
    CLOSE DATASET f_name.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER     = x1
        TABLES
          BINARY_TAB = LT_DATA.
    Im getting a short dump .
    Short text: The file is not open.
    Plz help me out.

    Hello Rajesh,
    You are trying to do use OPEN DATASET with a local file. NOT POSSIBLE
    You have to have the file in the app server to use OPEN DATASET.
    BR,
    Suhas

  • How to open a pdf file only in one computer

    I would like to sell pdf publications by allowing  the user to open them only in one computer. I learnt that this has been done  the past when I bought  some publications but I don't know the way to do it. Could you help me?
    thank you
    Marco

    thank you for your support
    Best Regards
    Marco
    Da:     Mylenium <[email protected]>
    Per:    MARCO1 <[email protected]>,
    Data:   09/10/2013 11:09
    Oggetto:        How to open a pdf
    file only in one computer
    Re: How to open a pdf file only in one computer
    created by Mylenium in Downloading, Installing, Setting Up - View the full
    discussion
    You will havwe to sign up for some service that supports rights
    management, use protected PDFs via LiveCyle/ Acrobat Connect or learn how
    to create your own ePub stuff using Digital Publishing Suite. In any case,
    it will probably cost you money upfront before you make any revenue.
    Mylenium
    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
    http://forums.adobe.com/message/5746873#5746873
    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: [
    http://forums.adobe.com/message/5746873#5746873]
    To unsubscribe from this thread, please visit the message page at [
    http://forums.adobe.com/message/5746873#5746873]. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in Downloading, Installing, Setting Up at Adobe
    Community
    For more information about maintaining your forum email notifications
    please go to http://forums.adobe.com/message/2936746#2936746.
    Il messaggio trasmesso può contenere informazioni di carattere
    confidenziale rivolte esclusivamente al destinatario. Ne è vietato l'uso,
    la diffusione, la distribuzione o la riproduzione da parte di altre
    persone e/o entità diverse da quelle specificate. Nel caso aveste ricevuto
    questo messaggio per errore, siete pregati di segnalarlo immediatamente al
    mittente e cancellare quanto ricevuto.
    This electronic mail transmission may contain confidential information
    addressed only to the person(s) named. Any use, distribution, copying or
    disclosure by any other person and/or entities other than the intended
    recipient is prohibited. If you received this transmission in error,
    please inform the sender immediately and delete the material

  • How to open a pdf file in JFrame

    hi to all,
    i need to know how to open a pdf file in JFrame. Help is needed with this would grateful, and i used the code state below..
    InputStream in=this.getClass().getResourceAsStream("/images/help1.pdf");
    Process p = Runtime.getRuntime().exec(in);Thanks in Advance...

    this is the error which i'm getting while executing the code
    init:
    deps-jar:
    Compiling 1 source file to /home/VEL AREA/SampleApplication/build/classes
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:3: package com.sun.pdfview does not exist
    import com.sun.pdfview.PDFFile;
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:4: package com.sun.pdfview does not exist
    import com.sun.pdfview.PDFPage;
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:5: package com.sun.pdfview does not exist
    import com.sun.pdfview.PagePanel;
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:25: cannot find symbol
    symbol : class PagePanel
    location: class sampleapplication.Main
    PagePanel panel = new PagePanel();
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:25: cannot find symbol
    symbol : class PagePanel
    location: class sampleapplication.Main
    PagePanel panel = new PagePanel();
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:36: cannot find symbol
    symbol : class PDFFile
    location: class sampleapplication.Main
    PDFFile pdffile = new PDFFile(buf);
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:36: cannot find symbol
    symbol : class PDFFile
    location: class sampleapplication.Main
    PDFFile pdffile = new PDFFile(buf);
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:39: cannot find symbol
    symbol : class PDFPage
    location: class sampleapplication.Main
    PDFPage page = pdffile.getPage(0);
    8 errors
    BUILD FAILED (total time: 2 seconds)
    for the reply #4..

  • How to open a pdf file and then attach it with images

    I am new to Indesign Server.
    I'm currently working on a pdf.
    I have a white blank pdf template.
    that I want to attach/glue it with images.
    How to open a pdf file and then attach it with images.
    Please, help me.
    Thanks.

    First step would be to make yourself familiar with InDesign desktop version.
    Whatever you intend to achieve, do it there manually. (see regular app docs or forums)
    Then try to automate your steps with scripting (see scripting docs or forum)
    If you can do it with a script in the desktop version, that script will likely also run in ID Server. (see server forum).
    If you can specify missing features not achievable thru scripting or manual use, reconsider to write a plugin (this forum).
    A seasoned C++ programmer will need a few months to learn the basics, wade thru tons of documentation etc. Alternatively consider to hire a consultant to do the development work for you.
    Dirk

  • How to send a mail in pdf format file in sbwp??

    how to send a mail in pdf format file in sbwp?? and how to read the content of the mail?

    Refer the following link for Sample Program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

  • Downloads - I want to open some PDFs/other file types from the internet but not have to save them; I can't figure out how to view them and close them without having to save them first.

    Downloads - I want to open some PDFs/other file types from the internet but not have to save them. I can't figure out how to view them and close them without having to save them first. When I click on a file, the downloads box opens and depending on the setting, it auto saves the file or asks me where to save the file. What if I don't want to save it anywhere, I just want to view it and close it?

    https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox
    https://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox

  • I can't remember how to open a pdf file that I saved in My Documents.

    At one time I knew how to open a pdf saved in My Documents on my iMac, but I can't remember now. I need to open this document because it's for my taxes. Any help will be greatly appreciated.
    ~ Sue

    Care to share which OS you are using?

  • We use a doc template to create a purchased part spec document and then save them as pdf formatted files.  These part spec documents are also appended with the datasheets for these purchased parts.  When we want to update/revise the document, is there a m

    We use a doc template to create a purchased part spec document and then save them as pdf formatted files.  These part spec documents are also appended with the datasheets for these purchased parts.  When we want to update/revise the document, is there a method, using Acrobat, to make those updates to the pdf, or must we go back to the doc template and basically generate a new document?
    Also, our resulting pdf documents aren't searchable.  How can we generate pdf documents that are searchable?  I may want to search for a part value or name within the body of these pdf documents, but currently can't do that...very inconvenient.
    Can you assist?

    Not totally sure about the search issue. A lot depends on how you created the PDF and what is in the datasheets you attached (like are they graphics?). The doc portion should be searchable as long as you used print to the Adobe PDF printer or PDF Maker. For your use, it may be that the print is adequate. However, the result should be searchable (unless maybe you had a form with filled in fields and created the PDF with PDF Maker. I think the form data may be retained in form fields and the fields are not searchable. In that case, a print might be a better procedure. (it would help to know the versions of WORD and Acrobat as well as the exact process you used to create the PDF.)
    If the appended data sheets do not change, then you might try opening the original PDF and then using Replace Pages to replace the file created from the DOC file.

  • How to open a pdf from pdf target with page no using javascript

    Hi
    How to open a pdf from pdf target with page no using javascript
    Thanks in Advance.

    Hello,
    <p>Web.show_document calling .htm files saved on disk.....</p>
    Francois

  • How to open multiple artboard illustrator file in illustrator. Coz, whenever we open a multiple artboard file, illustrator provide an option to chose one artboard but does not allow opening of all artboards. Somebody may explain it

    How to open multiple artboard illustrator file in illustrator. Coz, whenever we open a multiple artboard file, illustrator provide an option to chose one artboard but does not allow opening of all artboards. Somebody may explain it

    Doug's got it right. It sounds like you are trying to open a later version file in an earlier version. This will always be handled as opening the PDF portion of the file. Try Googling AI_openMultiPagePDF for a script to open these or Resave from the newer version to the older.

  • I would like to know how to transform a .raw format file into a 2D table ?

    I would like to know how to read a .raw format file with LabView? What I want to do is to make a 2D table from a .raw format file.
    There is already the jpg, bmp and png format reader function, but what about .raw?
    I'll wait for suggestions...
    thanks

    ...ok I got it ... the fact is that I have no idea of wich kind of format my .raw image is made with
    What I know is that I can opon it with photoshop and if I open it with "bloc-notes" it gives me something like this:
    c0h h > 5 (  9 c 9 c 1 ` N â ~ Z a T j J C S S G , @ E : 8 G 0 Z < > T 5 5 1 ( ) . F + ? m ; ^ - F ? . k / Å i Q L 7 M 9 : b 8 R T O D : ~ A M S S H H g ! ˆ H - P Z S 6 N 9 K A M 2 m Q T 4 V / : C = & B Z 2 F : L h R N [ \ d L @ 0 + M F J \ L ¦ K 5 L X d 8 ^ @ 6 E \ > * H F : V : k b = j E P P Q \ C = : U g G G > H \ _ I 2 E r ] ? E 3
    A C [ ^ U G L N P g W N H J k ; C U = [ ; 5 G E K G ? U o Q R X ; 7 X V 6 V V T 9 D A M p R M S J _ Q E G / g _ S S A ; K M Q @ ] L V C 8 < 6 m I \ ` N J Z 7 L 3 1 L “ b ` X Q P d S M O F f K ` A Q D E [ B N ^ j Y  R D L k Z E D @ Æ  G < N G d F c i T F  b . % I ^ L s Z I v ^ ¯ G G N U O q H H \ 0 G S \ N . N ` _ @ 8 Y p N 5 V K K m D 8 V \ } H R F o { P Z ` U g h D N  a I \ N ? B h P S H F W ? Q & M I G R N Y E W [ _ W K G @ J G f ‚ Y i R R v † ] D d O Y M L R 4 - 2 X H p [ d i F J T T M W # Q q g Q C M [ b › ] V ] A Ž e C 4 = a W o h P { E Q X M F _ n V
    D S z I ^ P _ S X [ T [ I L ® c ] J I W V D ] * # F ? Z S R [ b i ; > ; _ w g Z g G 1 ] F Q J X ~ A h V S V < V Y ^ G c _ [ M > S J S q ? n L E Q U N B 3 a M V $ _ C Y k S « A M e T T ^ H I
    ( ^ K R Z Y e P C n _ a V K + 2 _ V M d L N n M Ë r ` ^ ^ u Z K j L B V 1 b R Z f k P a [ M K b F f T A ` 5 4 > F ` D g Z d V n L @ ' H R ^ r s ` o B L Z S h Q f R c e u @ j O : [ _ R = K \ 9 T N Q X b X } h L _ ? B s ^ f ž V G c { A L Z P ; P Q E D z E Y U N \ _ F O  Y _ K W 6 \ T J ì ? V W Q U c [ `
    So the question now is how do I understand the original format of my .raw file?
    If I did things right I attached my zipped .raw file example (caccoletta.raw)
    I'll wait again for help
    thanks
    Attachments:
    caccoletta.zip ‏1493 KB

  • When trying to open a PDF format using Adobe XI I get an error message that there's a problem opening the document (57)

    When trying to open a PDF format using Adobe XI I get an error message that there's a problem opening the document (57)

    Hi chasore,
    Are you still facing this issue?
    Is this issue happening with all the documents you have. If yes, i would suggest try uninstall and reinstall. Or if the documents are located on some shared drive try to copy them on local machine and test again.
    Regards,
    Ajlan Huda.

  • "There was an error opening the pdf. File cannot be found" Message

    I am creating an Adobe PDF file using Save As in FrameMaker 7.0. (I have Acrobat Standard 8). The PDF creates fine, but I used to get the pdf to immediately/automatically open. Now I get the message "There was an error opening the pdf..."
    I did select the option to automatically open the pdf in File > Preferences but it doesnt do it, Any suggestions?
    Thanks.
    Beth

    Hi John Paul,
    Do you get any error code associated with this error message.
    Does this happen with other pdf files too or with that specific pdf?
    In case it happens with that specific pdf, please get another copy of that pdf because the current copy might have got corrupted.
    Regards,
    Rahul Tyagi

Maybe you are looking for

  • Garageband Loops Still Missing!

    I just got a brand new iMac. I go into Garageband and all the loops are missing! So i go to support and i follow the steps and find 501 sound clips. I import them all one by one, but still about 3/5th's of the loops are still not there. They have the

  • Why is renaming apps bad? What does it do?

    Hi all. I've been searching the web and forums all over, but i haven't found a satisfactory answer to this question yet. The best i've found is that the app may not function properly if renamed. Mainly I'm trying to find out if it's ok to rename apps

  • Working with 32 bit color HDRs in Lightroom

    The feature of being able to work with 32 bit color Tiff files in Lightroom is awesome and wonderful.  However, I note that when I do not follow the recommended workflow of bringing the 32 bit file directly back into Lightroom to work on it - working

  • Dual booting encrypted, hidden OS

    Hello, I recently discovered Arch Linux, and am somewhat of a linux noob in general. I have yet to install Arch (computer is in repair). I know that truecrypt allows users to fully encrypt an operating system, and to then create a hidden operating sy

  • Copy iTunes Music from one User to Another, Same iMac

    I'm running OS X 10.7, iTunes 10, and I want to copy  (not share, _copy_) my iTunes music library from one user to another on the same iMac. Please don't give me a solutioon that works on your OS X 10.5 or 10.6 software as 10.7 seems to be quite diff