samizdatco/skia-canvas

Partial PDF rendering

Closed this issue · 2 comments

I need to render just the canvas content to embed in an existing PDF. The PDF is already being generated with pdfkit, which provides an addContent function. Is it possible to render only the canvas output without the page wrapper so I can integrate it with my current PDF generation?

Unfortunately I don't think that will be possible without post-processing the generated PDF to extract the objects you're interested in. Skia's PDF exporter has quite limited configurability and (currently?) only allows for the creation of documents.

Ah i see. Thank you for your reply!