Results 1 to 2 of 2
  1. #1
    suriyababu is offline Member
    Join Date
    Jun 2012
    Posts
    6
    Rep Power
    0

    Default compile my program

    Dear Tolls,

    Thanks for the quick reply. here after i have following as per your instruction.

    could you clear my doubt,

    *Code*

    package com.gnostice.pdfone.PDFOne;
    package com.gnostice.pdfone.PdfDocument;
    package com.gnostice.pdfone.PdfException;

    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStreamWriter;


    public class TextExport {

    public static void main(String[] args) throws IOException, PdfException, Exception {

    int i, n;

    // Create a file writer instance
    FileOutputStream fos = new FileOutputStream("Output_Docs\\extracted_text.doc" );
    OutputStreamWriter osw = new OutputStreamWriter(fos, "utf-8");

    // Load a PDF document
    PdfDocument doc = new PdfDocument();
    doc.load("Input_Docs\\sample_doc.pdf");

    // Extract text from page 1 of the document
    // and save it to the file writer
    doc.saveAsText(1, osw);
    osw.close();

    // Close the PDF document
    doc.close();

    }
    }

    */code*

    *Error*

    $javac /tmp/135952418214353/com/gnostice/pdfone/PdfException/TextExport.java 2>&1
    /tmp/135952418214353/com/gnostice/pdfone/PdfException/TextExport.java:2: class, interface, or enum expected
    package com.gnostice.pdfone.PdfDocument;
    ^
    /tmp/135952418214353/com/gnostice/pdfone/PdfException/TextExport.java:3: class, interface, or enum expected
    package com.gnostice.pdfone.PdfException;
    ^
    2 errors

    */Error*

    Thanks,
    Suriyababu.SS

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,097
    Rep Power
    20

    Default Re: compile my program

    Looks like you accidentally created a new thread.
    I'll lock this one.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. compile my program
    By suriyababu in forum New To Java
    Replies: 10
    Last Post: 01-31-2013, 12:18 PM
  2. i can compile but not run the program???
    By stefandanielsen in forum New To Java
    Replies: 4
    Last Post: 03-10-2011, 12:15 PM
  3. Program will not compile?
    By vtecjerry in forum New To Java
    Replies: 1
    Last Post: 09-29-2010, 10:20 PM
  4. my program cannot be compile
    By justlynn in forum NetBeans
    Replies: 8
    Last Post: 08-17-2010, 10:11 AM
  5. Compile a program
    By toby in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 09:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •