CrazyEngineers
  • 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
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • ms_cs

    MemberJan 5, 2012

    Apache PDFBox is an java API, you can use this to extract the pdf data
    Are you sure? This action cannot be undone.
    Cancel
  • PraveenKumar Purushothaman

    MemberJan 5, 2012

    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();
            }
        }
    }
    Are you sure? This action cannot be undone.
    Cancel
  • imgopi

    MemberJan 5, 2012

    Thanks...
    Are you sure? This action cannot be undone.
    Cancel
  • imgopi

    MemberJan 5, 2012

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • PraveenKumar Purushothaman

    MemberJan 5, 2012

    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... 😀
    Are you sure? This action cannot be undone.
    Cancel
  • simplycoder

    MemberJan 6, 2012

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • imgopi

    MemberJan 6, 2012

    simplycoder
    If its fine with you, kindly upload the sample file along with the code that you have tried.
    Are you sure? This action cannot be undone.
    Cancel
  • Sandhya Nattu

    MemberJun 29, 2012

    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???
    Are you sure? This action cannot be undone.
    Cancel
  • imgopi

    MemberJul 16, 2012

    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
    Are you sure? This action cannot be undone.
    Cancel
  • Sandhya Nattu

    MemberJul 16, 2012

    Will you provide me code 😀 plz
    Are you sure? This action cannot be undone.
    Cancel
  • pittypan

    MemberFeb 20, 2014

    Sandhya Nattu
    hi gopii ,
    did you got the source code of how to <a href="https://www.rasteredge.com/how-to/vb-net-imaging/pdf-render-option/" target="_blank" rel="nofollow noopener noreferrer">VB.NET PDF: Set PDF Document Rendering Options in VB.NET Class</a> 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.

    <a href="https://www.codeproject.com/Answers/394089/PDF-table-data-to-Excel-using-Vb-net.aspx#answer1" target="_blank" rel="nofollow noopener noreferrer">[Solved] PDF table data to Excel using Vb.net - CodeProject</a>
    Are you sure? This action cannot be undone.
    Cancel
  • Ainur

    MemberMar 28, 2014

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • cathyhill

    MemberApr 7, 2014

    pittypan
    Google is a good friend. Try this link where you can find the sample code.

    <a href="https://www.codeproject.com/Answers/394089/PDF-table-data-to-Excel-using-Vb-net.aspx#answer1" target="_blank" rel="nofollow noopener noreferrer">[Solved] PDF table data to Excel using Vb.net - CodeProject</a><a href="https://www.rasteredge.com/how-to/vb-net-imaging/excel-converting/" target="_blank" rel="nofollow noopener noreferrer">VB.NET Excel: Convert & Render Excel Sheet to Other Documents & Images</a>

    Thanks, pitty, it helps.
    Are you sure? This action cannot be undone.
    Cancel
  • Dinesh Chandewar

    MemberMar 27, 2017

    hi friends i want to convert pdf file into excel sheet in java programming .....so any one help me..............
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register