this post was submitted on 20 Nov 2025
1488 points (98.8% liked)

People Twitter

10325 readers
2033 users here now

People tweeting stuff. We allow tweets from anyone.

RULES:

  1. Mark NSFW content.
  2. No doxxing people.
  3. Must be a pic of the tweet or similar. No direct links to the tweet.
  4. No international politcs
  5. Be excellent to each other.
  6. Provide an archived link to the tweet (or similar) being shown if it's a major celebrity, figure or any politician. If you replace the "x" at their site with xcancel (so it beomes xcancel.com), and you're not on mobile, it will save video. https://web.archive.org/save is another great option. Archive.is is no longer recommended because they remove/alter content.
  7. If a tweet (or similar) makes a statement of fact, either mark it as "satire" in the body or provide the original source link backing up the statement

founded 3 years ago
MODERATORS
 

Now. Why am I wrong for Libre

you are viewing a single comment's thread
view the rest of the comments
[–] plenipotentprotogod@lemmy.world 9 points 9 months ago (4 children)

Have you ever tried to look under the hood and interact with a pdf programmatically? I assure you it only gets worse.

A while ago I tried to write a small script to scrape data out of some account statements that my idiot bank only made available in pdf format. As far as I could tell, the file was just a list of tiny chunks of text along with sets of x/y coordinates specifying where each one should be placed on the page. Answering seemingly simple questions like "are these two words on the same line?" Involved comparing raw y-coordinates because the file had no concept of a "line of text", and even spaces between words were often simulated by bumping the x-coordinate over by a few pixels instead of using an actual space character.

I suspect those files were generated by a particularly bad piece of software, and a more competent one could probably do much better, but knowing that its even possible to create a file that cursed is still infuriating to me.

[–] thevoidzero@lemmy.world 5 points 9 months ago

Yup that's how PDFs are. I think the accessibility option one might have something (never tried parsing that).

Plus if you're working with language with diacritics then it's even worse because you can't even compare the coordinates properly, specially if some of them go beyond the previous characters. Not having the space combined with that meant it was really hard to determine the text, and it saves glyph from the font instead of character info too.

[–] dondelelcaro@lemmy.world 4 points 9 months ago

Probably Crystal Reports. It's cursed.

[–] bus_factor@lemmy.world 4 points 9 months ago

Yeah, don't try to hand-parse a raw PDF. You're better off rendering it and running OCR on the image in most cases. Only exception I know of is if you generated it with LaTeX.

[–] panda_abyss@lemmy.ca 3 points 9 months ago

Yes, I have looked at evil and I have not been back.