use std::fs; use usvg::fontdb::Database; use usvg::TreeParsing; use vl_convert_pdf::svg_to_pdf; fn main() { let tree = usvg::Tree::from_str(r#" Hello, World! "#, &Default::default()).unwrap(); let mut font_db = Database::new(); font_db.load_system_fonts(); let pdf_bytes = svg_to_pdf(&tree, &font_db, 1.0).unwrap(); fs::write("target/hello.pdf", pdf_bytes).unwrap(); }