Results 1 to 2 of 2
06-01-2011, 10:18 AM #1
- Join Date
- Dec 2010
Java Tutorial 1: Read a pdf file in Java using iText library
This is a basic tutorial in java, that shows how to read a pdf file. For this we use a library called iText . Using iText library, we can perform various pdf operations that it supports.
In this section , we are dealing with calculating the no. of pages & extracting the contents of each individual page.The steps are given below :
Add the iText library, by adding iText.jar to the lib folder of the project.
Use the following code to extract the content
PdfReader reader = new PdfReader(INPUTFILE); int n = reader.getNumberOfPages(); String str=PdfTextExtractor.getTextFromPage(reader, 2); //Extracting the content from a particular page. System.out.println(str);
Hope this program helps you start with basic pdf editing. Do revert back for queries
Last edited by thomas6188; 07-01-2011 at 07:29 PM.
07-10-2012, 08:10 PM #2
- Join Date
- Oct 2012
Re: Java Tutorial 1: Read a pdf file in Java using iText library
You can also refer to the tutorial series here covering different features of iText:
PDF Generation in Java: iText Tutorial - QuicklyJava
By Amir.php in forum TutorialsReplies: 2Last Post: 31-10-2009, 07:00 PM
By thewisecrab in forum ProgrammingReplies: 7Last Post: 31-08-2009, 08:53 PM
By Manojap in forum ProgrammingReplies: 5Last Post: 16-05-2009, 02:46 PM
By garv84 in forum ProgrammingReplies: 4Last Post: 11-04-2008, 02:41 PM
By iinfi in forum QnA (read only)Replies: 4Last Post: 12-09-2005, 10:09 AM