Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66553 > unrolled thread

Re: Puzzling PDF

Started byEmile van Sebille <emile@fenx.com>
First post2014-02-16 08:29 -0800
Last post2014-02-16 08:29 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Puzzling PDF Emile van Sebille <emile@fenx.com> - 2014-02-16 08:29 -0800

#66553 — Re: Puzzling PDF

FromEmile van Sebille <emile@fenx.com>
Date2014-02-16 08:29 -0800
SubjectRe: Puzzling PDF
Message-ID<mailman.7064.1392568170.18130.python-list@python.org>
You
On 2/16/2014 6:00 AM, F.R. wrote:
> Hi all,
>
> Struggling to parse bank statements unavailable in sensible
> data-transfer formats, I use pdftotext, which solves part of the
> problem. The other day I encountered a strange thing, when one single
> figure out of many erroneously converted into letters. Adobe Reader
> displays the figure 50'000 correctly, but pdftotext makes it into
> "SO'OOO" (The letters "S" as in Susan and "O" as in Otto). One would
> expect such a mistake from an OCR. However, the statement is not a scan,
> but is made up of text. Because malfunctions like this put a damper on
> the hope to ever have a reliable reader that doesn't require
> time-consuming manual verification, I played around a bit and ended up
> even more confused: When I lift the figure off the Adobe display (mark,
> copy) and paste it into a Python IDLE window, it is again letters (ascii
> 83 and 79), when on the Adobe display it shows correctly as digits. How
> can that be?
>


I've also gotten inconsistent results using various pdf to text 
converters[1], but getting an explanation for pdf2totext's failings here 
isn't likely to happen.  I'd first try google doc's on-line conversion 
tool to see if you get better results.  If you're lucky it'll do the job 
and you'll have confirmation that better tools exist.  Otherwise, I'd 
look for an alternate way of getting the bank info than working from the 
pdf statement.  At one site I've scripted firefox to access the bank's 
web based inquiry to retrieve the new activity overnight and use that to 
complete a daily bank reconciliation.

HTH,

Emile


[1] I wrote my own once to get data out of a particularly gnarly EDI 
specification pdf.



[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web