Curious if this works better than the pdftotext utility that comes in the Debian poppler-utils package. That has a --layout option that works really well sometimes and really terrible other times. Doesn't seem to be related to document complexity either.
Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
71–80 of 95 posts
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#72Earlier quoted context omitted.
For what it's worth, here's a service that does that https://documentalchemy.com/demo/pdf2txt (and more: https://documentalchemy.com/demo )
Just tried the demos on this website. I tried to extract text from a pdf that already has searchable text, which can be copy-pasted. This should be the easiest task of all but it made mistakes in every second word. Then I asked the website to make a pdf into a word-file. It just inserted the whole pdf as a picture in word.
Really? I'm pretty sure that's not the way this works.
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#73Earlier quoted context omitted.
Also available for windows and mac at http://www.foolabs.com/xpdf/download.html
Last year, my boss gave me a task that looked simple enough at first glance - get data on how many vacation days each employee has in total, how many they have used in the current year, and how many they have left, and put that data in our SharePoint server (so people can see when filling out a vacation request if they actually have enough days left). Most of that was fairly easy, except that the POS program that sit…
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#74Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#75For 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)
Tabula is the nice free tool but requires technical background to run it. There is a free https://pdf.co with both online and offline tools (Windows) for PDF to CSV. (disclaimer: i work on it)
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#76Earlier quoted context omitted.
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.
PDF is a perfectly fine and rich digital format. It also allows you to do proper copy and paste, which is much saner than anything paper offers. Sure, PDF is a light on context clues for automation and is targeted purely at humans. But formats targeted at both computers and humans consistently fail (XML with accompanying XSLT comes to mind), and/or only have terrible tools for creating files (easily parsable, pretty…
If you designed a real bad format on purpose, it would be hard to top PDF. Maybe Photoshop files are worse.
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#77This is important for (al)pine users ... when reading email in a terminal it is very useful to be able to open a PDF attachment as text and view it in the (terminal) mailtool ... Yes, (al)pine is my mailtool in 2017.
I use alpine in 2017. It's easy to use, pluggable, and faster than any GUI I've touched.
I had not considered the PDF issue. I just open them with an external application. The potential of reading them within Alpine hadn't occurred to me, but now it has, I want it!
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#78Earlier quoted context omitted.
PDF is not very fine. Copy-paste from PDF very often results in complete rubbish, even when it is not deliberately prevented (which the format allows, and then you have to do OCR).
People purposefully disallowing copy-paste isn't a problem with PDF: in other formats they would have embedded a picture, at least with PDF you get the other advantages of proper text: infinite zoom and great compression. Sadly there's also a lot of PDFs that are little more than a picture collection that looks like text, but that's hardly the file format's fault. It really is a problem with PDF that it's too easy to…
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#79For 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.
How do you imagine a better format PDF alternative? On the one hand, we have text-based formats. They are not serialization of the exact rendering. On the other hand, we have ps, which is, probably, too complex to be manipulated as text when rendered. PDF and dejavu do kinda both, even if quite imperfectly.
So how do we construct a file format, which can render a symbol (not necessarily a unicode one) anywhere, pixel-perfect, but still has concept of words, paragraphs, preferably tables and such?
Re: Show HN: PDFLayoutTextStripper – Converts PDF to text while keeping the layout
#80Earlier quoted context omitted.
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.
PDF is fucked up beyond all doubt. But there seems to be no better (even if unpopular) alternative. How do you imagine a better format PDF alternative? On the one hand, we have text-based formats. They are not serialization of the exact rendering. On the other hand, we have ps, which is, probably, too complex to be manipulated as text when rendered. PDF and dejavu do kinda both, even if quite imperfectly. So how do w…
I also think that, with more love, epub could get there too. It's not an easy problem, but if we can crack SHA-1 I'm sure we can crack this one too :)