Comment by SeriousM
1 day ago
To put it reaaaaaly simple, a PDF is like a notion document (blocks and bricks) with a git-like object graph?
1 day ago
To put it reaaaaaly simple, a PDF is like a notion document (blocks and bricks) with a git-like object graph?
Ha! As if anything about Notion is simple.
But yeah. It's all just objects pointing at each other. It's mostly tree structured, but not entirely. You have a Catalog of Pages that have Resources, like Fonts (that are likely to be shared by multiple pages hence, not a tree). Each Page has Contents that are a stream of drawing instructions.
This gives you a sense of what it all looks like. The contents of a page is a stack based vector drawing system. Squint a little (or stick it through an LLM) and you'll see Tf switches to Font F4 from the resources at size 14.66, Tj is placing a char at a position etc.
I'm going to hand wave away the 100+ different types of objects. But at it's core it's a simple model.