KurtCode/PDFKitten — Issue #6: Search can't find strings with small spaces?
Author: Pstoppani
Created: 2011-11-10 01:04:22+00:00
State: open

In this file http://dl.dropbox.com/u/39382628/test2.pdf, the word "test" is not found, even though the file contains just two words and they are both "test".

It seems that there are some spaces between some of the characters in the array passed to the TJ handler . These spaces cause the Scanner to reset its stringDetector which prevents it from finding the complete string.

Here is what I'm seeing:

2011-11-09 17:00:45.563 neuAnnotatePlus[12749:1f303] didScanString: t
2011-11-09 17:00:45.563 neuAnnotatePlus[12749:1f303] didScanSpace: value=111.00000000, width=0.11100001
2011-11-09 17:00:45.580 neuAnnotatePlus[12749:1f303] didScanString: e
2011-11-09 17:00:45.580 neuAnnotatePlus[12749:1f303] didScanSpace: value=-0.20000000, width=-0.00020000
2011-11-09 17:00:45.581 neuAnnotatePlus[12749:1f303] didScanString: st
2011-11-09 17:00:45.585 neuAnnotatePlus[12749:1f303] didScanSpace: value=0.20000000, width=0.00020000
2011-11-09 17:00:45.585 neuAnnotatePlus[12749:1f303] didScanString:
2011-11-09 17:00:45.586 neuAnnotatePlus[12749:1f303] didScanString:
2011-11-09 17:00:45.587 neuAnnotatePlus[12749:1f303] didScanString: t
2011-11-09 17:00:45.587 neuAnnotatePlus[12749:1f303] didScanSpace: value=0.20000000, width=0.00020000
2011-11-09 17:00:45.588 neuAnnotatePlus[12749:1f303] didScanString: e
2011-11-09 17:00:45.588 neuAnnotatePlus[12749:1f303] didScanSpace: value=-0.20000000, width=-0.00020000
2011-11-09 17:00:45.589 neuAnnotatePlus[12749:1f303] didScanString: st