Hacker News new | ask | show | jobs
by rafaelmn 564 days ago
Is Canvas really suitable for PDFs ? Afaik it's immediate mode bitmap graphics - so PDFs would just be embedded bitmaps ?
1 comments

We do indeed generate vector PDFs, not embedded bitmaps.

Our graphics engine works with Canvas API instructions — like "draw a line from point (A,B) to (C,D)." This API is small enough and low-level enough that it can also generate pristine vector output.

That's in fact one of the features of Skia Canvas (vector output in PDF and SVG).

Ah nice didn't know it had a PDF backend - that sounds perfect for this use case.