Now. Why am I wrong for Libre

  • panda_abyss@lemmy.ca
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    12 hours ago

    How is pdf the standard also?

    It’s got way too many features like 3d rendering. It’s proprietary. Simple things like copy and paste from a paper with columns does not work and is basically an unsolved AI problem.

    Like, it mostly renders the same, but fonts, OCR, etc are different between viewers, and the official Adobe reader/acrobat are totally enshittified with AI that they don’t work anymore.

    • plenipotentprotogod@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      11 hours ago

      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
        link
        fedilink
        arrow-up
        3
        ·
        6 hours 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.

      • bus_factor@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        9 hours 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.

    • amio@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      11 hours ago

      Also, the entire web stack, the entire history of email, Javascript - the horrors of the universe just happen

    • reallykindasorta@slrpnk.net
      link
      fedilink
      arrow-up
      3
      ·
      11 hours ago

      I hate how it deals with lines in chart grids where it looks like different lines are bolded depending on your zoom level

      • thevoidzero@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        4 hours ago

        Yeah, using vector graphics on PDF because you can zoom in and you get into that problem. For big drawings I just look at 100% zoom, otherwise if there’s too many lines on small drawings I just make a png instead.

      • panda_abyss@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        10 hours ago

        That’s an app issue I think. Preview on macOS renders very well, but macOS and postscript/pdf go back a long long way.