News for hackers. Stuff that matters.
Re:Show HN: I made a simple PDF text editor by saint-loup on Sunday May 31, 2020 @10:07AM (#23369684)
I learned a lot from this article (discovered on HN I think):

What's so hard about PDF text extraction? https://www.filingdb.com/pdf-text-extraction

In a nutshell, PDF is fundamentally different than MS Word: it's a standard for visual layout, without notions of paragraphs or even words.

As OP said, it doesn't mean the tool is useless. It could quite often come handy for myself.

Re:Show HN: I made a simple PDF text editor by mehrdadn on Sunday May 31, 2020 @10:24AM (#23369760)
One of the weirdest things I've seen is a PDF where the text is complete gibberish if you copy paste, but perfect if you export it to HTML or Word in Acrobat. Never figured out how or why that might happen.
Re:Show HN: I made a simple PDF text editor by Tsiklon on Monday June 01, 2020 @10:24AM (#23378767)
I read somewhere (likely here) that this oddness comes from the idea that PDF is a way of structuring documents for print first, and presentation in a user interface is secondary.

That the rendering of the document on screen is paramount as opposed to ability to manipulate the text itself. "These characters should be displayed at this position in the document precisely"

It would make sense that exporting the document as HTML or Word would make this easier - as these document formats have different goals.

Re:Show HN: I made a simple PDF text editor by _chompsky on Sunday May 31, 2020 @10:59AM (#23369961)
seen that happen quite often with LaTeX documents!