Results 1 to 2 of 2
Thread: Read Tamil Text Pdf From Java
- 04-24-2010, 08:43 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 15
- Rep Power
- 0
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
please helpJava 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(); }
Thanks in advance
Vinoop
- 04-24-2010, 02:12 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
That's because the relevant font is not installed in your PC. Did you?
Similar Threads
-
How to read DatePicker Text box value in jsf?
By kishan in forum JavaServer Faces (JSF)Replies: 1Last Post: 05-12-2010, 04:23 PM -
How can we read text file in java 1.4
By javasaravanan in forum Advanced JavaReplies: 4Last Post: 11-30-2009, 03:28 PM -
Read from a text file?
By aaronfsimons in forum New To JavaReplies: 3Last Post: 05-01-2009, 04:42 AM -
read from text file
By rayda in forum New To JavaReplies: 5Last Post: 04-10-2009, 03:51 AM -
How to read a text file from a Java Archive File
By Java Tip in forum Java TipReplies: 0Last Post: 02-08-2008, 09:13 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks