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

    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) {
                     doc.close();
                 }
            }
           return sw.toString();
      }
    please help

    Thanks in advance
    Vinoop

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

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, 05: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, 04:28 PM
  3. Read from a text file?
    By aaronfsimons in forum New To Java
    Replies: 3
    Last Post: 05-01-2009, 05:42 AM
  4. read from text file
    By rayda in forum New To Java
    Replies: 5
    Last Post: 04-10-2009, 04: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, 10: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
  •