Earlier quoted context omitted.
How many different PDF generators have done those millions of PDFs tho? Because you're right if you're paid to evaluate all the formats with the Mark 1 eyeball and do a custom parser for each. It sounds like it's feasible for your application. If you want a generic solution that doesn't rely on a human spending a week figuring out that those 4 absolutely positioned text fields are the invoice number together (and in…
We process invoices from around the world, so more PDF generators than I care to count. It is hard a problem for sure, but the problem is the rendering , you can't escape that by rastering it, that is rendering. So it is absurd to pretend you can solve the rendering problem by rendering it into an image instead of a structured format. By rendering it into a raster, now you have 3 problems, parsing the PDF, rendering…
So you want to parse a PDF?
101–110 of 236 posts
Re: So you want to parse a PDF?
#102Disclaimer - Founder of Tensorlake, we built a Document Parsing API for developers. This is exactly the reason why Computer Vision approaches for parsing PDFs works so well in the real world. Relying on metadata in files just doesn't scale across different source of PDFs. We convert PDFs to images, run a layout understanding model on them first, and then apply specialized models like text recognition and table recogn…
Doesn't rendering to an image require proper parsing of the PDF?
Re: So you want to parse a PDF?
#103Earlier quoted context omitted.
We process invoices from around the world, so more PDF generators than I care to count. It is hard a problem for sure, but the problem is the rendering , you can't escape that by rastering it, that is rendering. So it is absurd to pretend you can solve the rendering problem by rendering it into an image instead of a structured format. By rendering it into a raster, now you have 3 problems, parsing the PDF, rendering…
You are using the Mark 1 eyeball for each new type of invoice to figure out what field goes where, right?
Re: So you want to parse a PDF?
#104Earlier quoted context omitted.
Kinda funny. Printing a PDF and scanning it for an email it would normally be worthy of major ridicule. But you’re basically doing that to parse it. I get it, have heard of others doing the same. Just seems damn frustrating that such is necessary. The world sure doesn’t parse HTML that way!
I've built document parsing pipelines for a few clients recently, and yeah this approach yields way superior results using what's currently available. Which is completely absurd, but here we are.
Re: So you want to parse a PDF?
#105Disclaimer - Founder of Tensorlake, we built a Document Parsing API for developers. This is exactly the reason why Computer Vision approaches for parsing PDFs works so well in the real world. Relying on metadata in files just doesn't scale across different source of PDFs. We convert PDFs to images, run a layout understanding model on them first, and then apply specialized models like text recognition and table recogn…
It might sound absurd, but on paper this should be the best way to approach the problem. My understanding is that PDFs are intended to produce an output that is consumed by humans and not by computers, the format seems to be focused on how to display some data so that a human can (hopefully) easily read them. Here it seems that we are using a technique that mimics the human approach, which would seem to make sense. I…
It may seem so, but what it really focuses on is how to arrange stuff on a page that has to be printed. Literally everything else, from forms to hyperlinks, were later additions (and it shows, given the crater-size security holes they punched into the format)
Re: So you want to parse a PDF?
#106Disclaimer - Founder of Tensorlake, we built a Document Parsing API for developers. This is exactly the reason why Computer Vision approaches for parsing PDFs works so well in the real world. Relying on metadata in files just doesn't scale across different source of PDFs. We convert PDFs to images, run a layout understanding model on them first, and then apply specialized models like text recognition and table recogn…
It might sound absurd, but on paper this should be the best way to approach the problem. My understanding is that PDFs are intended to produce an output that is consumed by humans and not by computers, the format seems to be focused on how to display some data so that a human can (hopefully) easily read them. Here it seems that we are using a technique that mimics the human approach, which would seem to make sense. I…
Re: So you want to parse a PDF?
#107The answer seems obvious to me: 1. PDFs support arbitrary attached/included metadata in whatever format you like. 2. So everything that produces PDFs should attach the same information in a machine-friendly format. 3. Then everyone who wants to "parse" the PDF can refer to the metadata instead. From a practical standpoint: my first name is Geoff. Half the resume parsers out there interpret my name as "Geo" and "ff" s…
If you're interested in helping out the resume parsers, take a look at the accessibility tree. Not every PDF renderer generates accessible PDFs, but accessible PDFs can help shitty AI parsers get their names right.
As for the ff problem, that's probably the resume analyzer not being able to cope with non-ASCII text such as the ff ligature. You may be able to influence the PDF renderer not to generate ligatures like that (at the expense of often creating uglier text).
Re: So you want to parse a PDF?
#108Disclaimer - Founder of Tensorlake, we built a Document Parsing API for developers. This is exactly the reason why Computer Vision approaches for parsing PDFs works so well in the real world. Relying on metadata in files just doesn't scale across different source of PDFs. We convert PDFs to images, run a layout understanding model on them first, and then apply specialized models like text recognition and table recogn…
Re: So you want to parse a PDF?
#109Earlier quoted context omitted.
> This is exactly the reason why Computer Vision approaches for parsing PDFs works so well in the real world. One of the biggest benefits of PDFs though is that they can contain invisible data. E.g. the spec allows me to embed cryptographic proof that I've worked at the companies I claim to have worked at within my resume. But a vision-based approach obviously isn't going to be able to capture that.
Cryptographic proof of job experience? Please explain more. Sounds interesting.
I'm not sure if there's software out there to make that process easy, but the format allows for it. The format also allows for someone to produce and sign one version and someone else to adjust that version and sign the new changes.
Funnily enough, the PDF signature actually has a field to refer to a (picture of) a readable signature in the file, so software can jot down a scan of a signature that automatically inserts cryptographic proof.
In practice I've never seen PDFs signed with more than one signature. PDF readers from anyone but Adobe seem to completely ignore signatures unless you manually open the document properties, but Adobe Reader will show you a banner saying "document signed by XYZ" when you open a signed document.
Re: So you want to parse a PDF?
#110Disclaimer - Founder of Tensorlake, we built a Document Parsing API for developers. This is exactly the reason why Computer Vision approaches for parsing PDFs works so well in the real world. Relying on metadata in files just doesn't scale across different source of PDFs. We convert PDFs to images, run a layout understanding model on them first, and then apply specialized models like text recognition and table recogn…
While you're doing this, please also tell people to stop producing PDF files in the first place, so that eventually the number of new PDFs can drop to 0. There's no hope for the format ever since manager types decided that it is "a way to put paper in the computer" and not the publishing intermediate format it was actually supposed to be. A vague facsimile of digitization that should have never taken off the way it d…