Skip to content

Compile to PNG #16

Description

@gorghoa

Hi! First, thanks for Imprintor, I use it to print pdf, works great :)

I have a use case though where I'd like to render a Typst document to a raster image (PNG) rather than a PDF.

Today the public API is PDF-only

i.e. a typst_to_png / typst_to_png_file nif mirroring the PDF ones, with a scale/ppi option, exposed as Imprintor.compile_to_png/1 (and compile_to_png_file/2).

Would you be open to a PR adding this? Happy to implement it following the existing PDF code paths and conventions. Wanted to check interest before opening one.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions