Results 1 to 2 of 2
  1. #1
    vinoopraj is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default Read Tamil Text Pdf From Java

    Hi All,

    I am just trying to read content from a pdf file via java. The Pdf File is in the format of editable text. so i can copy the entire content manually.

    I have done this using PDFBox, but the thing what is, i have another language content also in the PDF Format. I cant get the exact content.

    When i am reading a normal English PDF file , i can get the entire Content... but when i am reading another language file its displaying like this "???????????"

    This is my code

    Java Code:
    public String getPdfText(String fileName) throws IOException {
            StringWriter sw = new StringWriter();
            PDDocument doc = null;
            try {
                doc = PDDocument.load(fileName);
                PDFTextStripper stripper = new PDFTextStripper();
                stripper.setStartPage( 1 );
                stripper.setEndPage( Integer.MAX_VALUE );
                stripper.writeText(doc, sw);
            } finally {
                 if (doc != null) {
           return sw.toString();
    please help

    Thanks in advance

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power

Similar Threads

  1. How to read DatePicker Text box value in jsf?
    By kishan in forum JavaServer Faces (JSF)
    Replies: 1
    Last Post: 05-12-2010, 04:23 PM
  2. How can we read text file in java 1.4
    By javasaravanan in forum Advanced Java
    Replies: 4
    Last Post: 11-30-2009, 03:28 PM
  3. Read from a text file?
    By aaronfsimons in forum New To Java
    Replies: 3
    Last Post: 05-01-2009, 04:42 AM
  4. read from text file
    By rayda in forum New To Java
    Replies: 5
    Last Post: 04-10-2009, 03:51 AM
  5. How to read a text file from a Java Archive File
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-08-2008, 09:13 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