to-pdf

Crates.ioto-pdf
lib.rsto-pdf
version0.1.0
sourcesrc
created_at2024-01-26 00:24:59.770923
updated_at2024-01-26 00:24:59.770923
descriptionExport & Preview as PDF
homepage
repositoryhttps://github.com/bob22z/to-pdf
max_upload_size
id1114868
size1,697
(bob22z)

documentation

https://docs.rs/to-pdf

README

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

Commit count: 0

cargo fmt