PDF to EXCEL convertion through Java

Hi friends i want to do my main project on java.The main aim is to store university result in database,the university send a PDF file to respected colleges.So my activities are
1)converting PDF to excel
2)and storing that file in database
so help me and give me your suggestions for this task,
and what are the classes needed for conversion of files through Java.

Replies

  • ms_cs
    ms_cs
    Apache PDFBox is an java API, you can use this to extract the pdf data
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    Try this out:
    import java.io.FileOutputStream;
     
    import com.lowagie.text.Document;
    import com.lowagie.text.Rectangle;
    import com.lowagie.text.pdf.BaseFont;
    import com.lowagie.text.pdf.PdfContentByte;
    import com.lowagie.text.pdf.PdfImportedPage;
    import com.lowagie.text.pdf.PdfReader;
    import com.lowagie.text.pdf.PdfWriter;
     
    public class ReadYourOwnPDFFile {
        public static void main(String[] args) {
            try {
                PdfReader reader = new PdfReader("YourOwnPDF.pdf");
                int n = reader.getNumberOfPages();
                // we retrieve the size of the first page
                Rectangle psize = reader.getPageSize(1);
               
                System.out.println(reader.getPdfVersion());
                System.out.println(reader.getFileLength());
                System.out.println(psize.height());
                System.out.println(psize.width());
            }
            catch (Exception de) {
                de.printStackTrace();
            }
        }
    }
  • imgopi
    imgopi
    Thanks...
  • imgopi
    imgopi
    Praveen-Kumar
    Try this out:
    import java.io.FileOutputStream;
     
    import com.lowagie.text.Document;
    import com.lowagie.text.Rectangle;
    import com.lowagie.text.pdf.BaseFont;
    import com.lowagie.text.pdf.PdfContentByte;
    import com.lowagie.text.pdf.PdfImportedPage;
    import com.lowagie.text.pdf.PdfReader;
    import com.lowagie.text.pdf.PdfWriter;
     
    public class ReadYourOwnPDFFile {
        public static void main(String[] args) {
            try {
                PdfReader reader = new PdfReader("YourOwnPDF.pdf");
                int n = reader.getNumberOfPages();
                // we retrieve the size of the first page
                Rectangle psize = reader.getPageSize(1);
             
                System.out.println(reader.getPdfVersion());
                System.out.println(reader.getFileLength());
                System.out.println(psize.height());
                System.out.println(psize.width());
            }
            catch (Exception de) {
                de.printStackTrace();
            }
        }
    }
    First thanks for your response and this program gives information about the PDF file friend,but i need Excel file from PDF.
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    imgopi
    First thanks for your response and this program gives information about the PDF file friend,but i need Excel file from PDF.
    Okay... Lemme try out something and get back to you... 😀
  • simplycoder
    simplycoder
    imgopi
    Hi friends i want to do my main project on java.The main aim is to store university result in database,the university send a PDF file to respected colleges.So my activities are
    1)converting PDF to excel
    2)and storing that file in database
    so help me and give me your suggestions for this task,
    and what are the classes needed for conversion of files through Java.
    If its fine with you, kindly upload the sample file along with the code that you have tried.
  • imgopi
    imgopi
    simplycoder
    If its fine with you, kindly upload the sample file along with the code that you have tried.
  • Sandhya Nattu
    Sandhya Nattu
    hi gopii ,
    did you got the source code of how to convert the pdf file to excel using java . i m also working with it will u please help me by giving code or in tracing how to convert???
  • imgopi
    imgopi
    Sandhya Nattu
    hi gopii ,
    did you got the source code of how to convert the pdf file to excel using java . i m also working with it will u please help me by giving code or in tracing how to convert???
    Sorry for late reply
    First I convert PDF to Word then I convert it to Excel
  • Sandhya Nattu
    Sandhya Nattu
    Will you provide me code 😀 plz
  • pittypan
    pittypan
    Sandhya Nattu
    hi gopii ,
    did you got the source code of how to VB.NET PDF: Set PDF Document Rendering Options in VB.NET Class file to excel using java . i m also working with it will u please help me by giving code or in tracing how to convert???
    Google is a good friend. Try this link where you can find the sample code.

    [Solved] PDF table data to Excel using Vb.net - CodeProject
  • Ainur
    Ainur
    Hello.
    You solved the problem. Can you help me?
    imgopi
    Hi friends i want to do my main project on java.The main aim is to store university result in database,the university send a PDF file to respected colleges.So my activities are
    1)converting PDF to excel
    2)and storing that file in database
    so help me and give me your suggestions for this task,
    and what are the classes needed for conversion of files through Java.
  • cathyhill
    cathyhill
    pittypan
    Google is a good friend. Try this link where you can find the sample code.

    [Solved] PDF table data to Excel using Vb.net - CodeProjectVB.NET Excel: Convert & Render Excel Sheet to Other Documents & Images

    Thanks, pitty, it helps.
  • Dinesh Chandewar
    Dinesh Chandewar
    hi friends i want to convert pdf file into excel sheet in java programming .....so any one help me..............

You are reading an archived discussion.

Related Posts

Toyota is set to unveil its LF-LC 2+2 Hybrid sports coupe. The car maker is behind Hideous and will only reveal further details at the event itself. But there are...
crush.hitherto.in is a student startup by IIT Guwahati student Piyush Bengani. The system works like this: You add 'the one' as your 'crush' in the hitherto.in service. Then that person...
Mahindra & Mahindra has showcased its much awaited rotating seat concept at Delhi auto expo. What is it exactly? Read more to know more ☕ Rotating Concept XIV-1 At Delhi...
Mahindra has finally unveiled its SUV rexton at the Delhi auto show. The Indian company has made many modifactions in earlier models to make it robust. One of them is...
If you had to choose between Java or Ruby, which one would you choose? And why?