← Back to context

Comment by dwroberts

4 hours ago

Unless you can embed fonts [into the page itself] you aren’t beating PDF

Not only can you embed the fonts, but you can make it interactive and output a PDF if you really wanted to. The HTML might grow if you embed enough JS, but on the other hand... some PDFs are insanely large.

Not a problem with data: URIs. But then, a report may not need fancy fonts if HTML is acceptable.

You can embed fonts into an HTML page. For example, place an @font-face with the src:url being a base64-encoded blob, in a style element.