messense/typst-py

[feature request] add support for png export

OrangeX4 opened this issue · 0 comments

The code mentions that you can export pdf, svg, and png formats:

Args:
input (PathLike): Project's main .typ file.
output (Optional[PathLike], optional): Path to save the compiled file.
Allowed extensions are `.pdf`, `.svg` and `.png`

But actually we can only export pdf:

typst-py/src/compiler.rs

Lines 27 to 30 in d1c177c

match result {
// Export the PDF / PNG.
Ok(document) => Ok(export_pdf(&document, self)?),
Err(errors) => Err(format_diagnostics(self, &errors, &warnings).unwrap().into()),