1 unstable release

0.1.0 Jan 26, 2024

#39 in #preview

30 downloads per month

MIT license

2KB

to-pdf

About

Crates.io

API Docs

Installation

Add the following to Cargo.toml:

[dependencies]
to-pdf = { git = "https://github.com/bob22z/to-pdf" }

Usage

use to_pdf::ToPdf;

// Initialize with custom fonts
let to_pdf = ToPdf::new(FONT_PATH)?;

// Export to Pdf with typst text
let pdf_content = to_pdf.to_pdf(TYPST_TEXT)?;

// Preview as Svg with typst text
let svg_content_list = to_pdf.to_svg(TYPST_TEXT)?;

License

MIT

No runtime deps