▲ | JKCalhoun 15 hours ago | |||||||
Interesting. Two engineers at Apple worked on something similar that would slurp character bounding boxes from a PDF page and reconstruct paragraphs, columns, tables, etc. It was surfaced in iOS a decade ago as "tap to zoom" feature for PDFs. It's funny — as with a lot of things there was a lot of sophisticated engineering under the hood and then marketing simply wants it to detect a tap in a paragraph and zoom to its bounds. I can't think of the last time I read a PDF on my phone or I would test it to see if it still works as I remember. | ||||||||
▲ | herodotus 10 hours ago | parent | next [-] | |||||||
One of those engineers came up with idea of using cluster analysis for word grouping. The other engineer realized that we had a k-cluster problem in the general case, but needed to figure out what k was. (In the simplest case it is 2 - letter gaps and word gaps). They used the differences between the anchor points of glyphs. | ||||||||
▲ | queuebert 41 minutes ago | parent | prev | next [-] | |||||||
Should there be a million-dollar prize for developing a way to parse and reflow the text in PDFs in real time? Reading PDFs on screens is a huge headache. | ||||||||
| ||||||||
▲ | NoPicklez 11 hours ago | parent | prev | next [-] | |||||||
I think we're thinking the same thing, but this is one of those little features on modern smartphones that we used to take for granted. Being table to tap to zoom on a document and have it snap to the right spot was a big feature improvement, now we expect it. | ||||||||
▲ | msarnoff 6 hours ago | parent | prev | next [-] | |||||||
I was there when we added it to Preview ;) I think Nils wrote the code to hook it up, because he also worked on the loupe and how it would automatically lock onto the bounding box of a line. | ||||||||
| ||||||||
▲ | herodotus 6 hours ago | parent | prev | next [-] | |||||||
I can confirm that tap to zoom and word higlight still works on many PDFs. PDF documents are so varied in structure that it is impossible to say that any technique always works. | ||||||||
▲ | el_benhameen 14 hours ago | parent | prev | next [-] | |||||||
Wow, I had no idea. That’s pretty cool. I don’t read a ton of pdfs on my phone, but I always find it super frustrating when that functionality is missing somewhere else. | ||||||||
▲ | weinzierl 5 hours ago | parent | prev | next [-] | |||||||
I often find myself making a screenshot and copy pasting from the image because selection in many apps is so broken. Especially for PDF, the iOS viewer has completely useless selection. | ||||||||
▲ | msephton 6 hours ago | parent | prev [-] | |||||||
Not just PDFs, you can also do the same thing (double tap to zoom to a paragraph) in Safari on any web page. |