Live data from Hacker News

The surprisingly complex journey to text-selectable client-side generated PDFs

sdocs.dev

51–60 of 66 posts

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#51
Tangentially related, one of the most underappreciated projects for print media and PDF generation is paged.js. It goes down the rabbit hole of paged media and the surprising complexity of it (have you ever thought about what it takes to render a table across multiple pages?) and provides a great foundation for solving these problems with sanity and using open web standards. It's a project that deserves more support.

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#53
post #52

This page made me discover the tool, and I find sdocs.dev pretty cool!

Thank you very much! I launched via a Show HN a few weeks ago [1] which goes into quite a few details which might not be obvious.

Also one thing that probably isn't clear with everything I've written so far is that by far the most enjoyable use case I've found with SmallDocs (or the `sdoc` cli command) is telling your CLI-based agent to "sdoc" you things. E.g.:

* "write up the plan and sdoc it to me"

* "explain async/await to me simply in a sdoc"

* "draft the release notes as a sdoc I can send to Ben for feedback"

* etc.

[1] https://news.ycombinator.com/item?id=47777633

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#54
post #51

Tangentially related, one of the most underappreciated projects for print media and PDF generation is paged.js. It goes down the rabbit hole of paged media and the surprising complexity of it (have you ever thought about what it takes to render a table across multiple pages?) and provides a great foundation for solving these problems with sanity and using open web standards. It's a project that deserves more support.

Nice shout - I will check it out - this I assume: https://github.com/pagedjs/pagedjs/

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#55

"everyone hates PDFs where you can't reliably select and copy text!" Boy do I. One of my biggest annoyances is receiving an invoice in pdf format, where I can either not select the text at all, or where you cannot cleanly select text, i.e. when you try to select something it somehow half highlights the line above as well and I am not sure what is on my clipboard, and need to paste temporarily in a text editor, then s…

> select a rectangle and perform OCR

You get that out of the box on an up to date KDE, from the screenshoting application Spectacle.

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#56
post #35

"everyone hates PDFs where you can't reliably select and copy text!" Boy do I. One of my biggest annoyances is receiving an invoice in pdf format, where I can either not select the text at all, or where you cannot cleanly select text, i.e. when you try to select something it somehow half highlights the line above as well and I am not sure what is on my clipboard, and need to paste temporarily in a text editor, then s…

Personal lifehack: Use the address bar of your browser to view the clipboard content quickly and to omit any formatting from it.

This also conveniently sends it to your search provider, and possibly to the browser vendor for analytics.

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#57
post #35

Earlier quoted context omitted.

Personal lifehack: Use the address bar of your browser to view the clipboard content quickly and to omit any formatting from it.

This also conveniently sends it to your search provider, and possibly to the browser vendor for analytics.

Depends on your settings.

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#58
The second part of the article moves into a very confusing to read user experience.

That said, maybe I missed it, but I didn’t see any mention of pandoc that is known to do markdown > pdf rendering “client side”.

This wasn’t AI written by chance?

Re: The surprisingly complex journey to text-selectable client-side generated PDFs

#59
post #35

Earlier quoted context omitted.

Personal lifehack: Use the address bar of your browser to view the clipboard content quickly and to omit any formatting from it.

This also conveniently sends it to your search provider, and possibly to the browser vendor for analytics.

These days it’s hard to be sure of anywhere you can paste a piece of text and be certain it’s not being sent to a server somewhere.
Post reply on HN