Live data from Hacker News

Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

github.com

31–40 of 95 posts

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#31

Fairly frequently, OCR engines are posted here. But almost without exception, they lack layout analysis, which renders them largely useless. Is this something that could be combined with those OCR engines? (e.g. TesseractOCR...)

PDF.co offline tool (for Windows) supports OCR and partial OCR for pdf to text and pdf to csv with layout preserved. (disclaimer: i work on it)

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#32
post #2

who would be interested by an online website doing the job?

if you really want to rake it in, serve, at static speeds (meaning instantly, I swear, boot a ramdrive (Tmpfs) and serve static html from nginx all from RAM), text versions of the top 10,000 web sites. there is so much crap on most sites. re-crawl hourly. monetize via Google adwords. EDIT: I'm not sure why I'm being downvoted. I am not suggesting serving PDF's. I am suggesting serving tiny text renders of top sites,…

Doesn't Opera Mini or Turbo already provide this sevice? Perhaps add PPMD proxy text compression with an English dictionary with a JavaScript browser plugin on top of that. You can't get more efficient than that

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#34

Fairly frequently, OCR engines are posted here. But almost without exception, they lack layout analysis, which renders them largely useless. Is this something that could be combined with those OCR engines? (e.g. TesseractOCR...)

I would not call these services useless ;) - but I wonder the same... Some apis like https://ocr.space return the coordinates of each converted word. Can that be a used input? (I have not tried it yet)

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#35
post #13

Earlier quoted context omitted.

if you really want to rake it in, serve, at static speeds (meaning instantly, I swear, boot a ramdrive (Tmpfs) and serve static html from nginx all from RAM), text versions of the top 10,000 web sites. there is so much crap on most sites. re-crawl hourly. monetize via Google adwords. EDIT: I'm not sure why I'm being downvoted. I am not suggesting serving PDF's. I am suggesting serving tiny text renders of top sites,…

You can use the SHA-1 of the PDF's to avoid serving the same pdf twice.

You've been away from HN a few days? The SHA-1 collision example uses PDFs in its demo. Hence other commenter saying SHA 256

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#36
post #2

who would be interested by an online website doing the job?

Yeah, sure, a public one for not privacy-critical PDFs plus something like a Heroku button to build own secure app (with auth and no storage).

See e.g. my file sharing app https://github.com/andreif/SecretFile

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#37

Fairly frequently, OCR engines are posted here. But almost without exception, they lack layout analysis, which renders them largely useless. Is this something that could be combined with those OCR engines? (e.g. TesseractOCR...)

I would not call these services useless ;) - but I wonder the same... Some apis like https://ocr.space return the coordinates of each converted word. Can that be a used input? (I have not tried it yet)

ephesoft seems to use this for classifying and data extraction from documents.

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#38

Although I haven't tested this yet, these utilities tend to fail when fed a table with empty cells.

The first example image in the linked article shows a conversion from a table with some empty cells. It looks fine.

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#39
post #16

For those interested in converting PDF tables into CSV, there's also Tabula ( http://tabula.technology/ ) (Used by many journalists to analyze the data in PDFs)

I find it absolutely ridiculous that we have to resort to these kinds of tools :/ We have digital formats, and we decided to standardize document distribution on the one that makes it as hard to extract data as if it were on physical paper.

That's Adobe. Look at their other formats, and PDF seems to be one of their better ones. Compare to SWF, PSD, AI and so on.

PDF is the successor of PostScript. PostScript is a stack-based programming language where anything can happen, while PDF enforces some document structure and metadata structure on top of it, so you can e.g. at least determine where pagebreaks are, without having to interpret ("run the code of") the whole document.

Still, PDF is simpler than PostScript in the same sense that XML is a simplification of SGML. Jumping from PDF to a well-designed format would be like jumping from XML to JSON or S-Expr.

Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout

#40

Earlier quoted context omitted.

if you really want to rake it in, serve, at static speeds (meaning instantly, I swear, boot a ramdrive (Tmpfs) and serve static html from nginx all from RAM), text versions of the top 10,000 web sites. there is so much crap on most sites. re-crawl hourly. monetize via Google adwords. EDIT: I'm not sure why I'm being downvoted. I am not suggesting serving PDF's. I am suggesting serving tiny text renders of top sites,…

Doesn't Opera Mini or Turbo already provide this sevice? Perhaps add PPMD proxy text compression with an English dictionary with a JavaScript browser plugin on top of that. You can't get more efficient than that

Maybe, but asking someone to use a new browser is asking a lot. If you like, you can think of this as Opera minifier/turbofier as a service.
Post reply on HN