News for hackers. Stuff that matters.
Re:Embedded PDF viewer in Firefox 81 supports filling forms by mkl on Tuesday September 22, 2020 @06:34PM (#24560789)
More. Go here and download the PDF spec.: https://www.adobe.com/devnet/pdf/pdf_reference.html

Look at Chapter 3, Syntax. The code is all text based. We are not talking about the visible characters in a PDF viewer, but the code of the PDF file itself.

Re:Embedded PDF viewer in Firefox 81 supports filling forms by roflc0ptic on Wednesday September 23, 2020 @08:20AM (#24566111)
Oh, true. I misread, and also didn't know that. Thanks for the info!
Re:Embedded PDF viewer in Firefox 81 supports filling forms by hnick on Wednesday September 23, 2020 @11:39PM (#24575017)
Going by your original premise though, just so you know the reference does indeed have examples of text as strings e.g.

BT /F13 12 Tf 288 720 Td (ABC) Tj ET

This can be extended to include spaces so you can essentially mark up entire lines of text at one time. What it can't do is cohesive paragraphs and flow/wrap, you need to use the relative positions to work out what text is in one block (and usually I'd defer to something like pdftotext for simple cases).

Laying out individual characters is common though. It's probably due to kerning concerns.