Modifications in PDF text extraction for issue #16
Add some robustness for Issue #16