shailendra3009,

shailendra3009 wrote
> i used below code to extract text line by line. It is extracting code
> perfectly only it is not reading white spaces in PDF.

As already pointed out in a comment to your parallel post on StackOverflow,
the answer

http://stackoverflow.com/questions/13644419/itext-java-pdf-to-text-creation/13645183#13645183

illustrates the reason and hints at a solution: Copy the text extration
strategy (either the SimpleTextExtractionStrategy or the
LocationTextExtractionStrategy) and tweak the internal parameters, in your
case the minimum width of a gap to be recognized as a space,
renderInfo.getSingleSpaceWidth()/2f by default; the person who asked back
there got improved results using renderInfo.getSingleSpaceWidth()/4f.

Regards,   Michael



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/How-can-i-extract-text-from-pdf-including-white-spaces-tp4658195p4658197.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to