@@ -13,23 +13,23 @@ will still be turned into a vector graphic), so no quality is lost.
1313This example reads an SVG file and writes the corresponding PDF back to the disk.
1414
1515```
16- * # fn main() -> Result<(), Box<dyn std::error::Error>> {
17- * use svg2pdf::usvg::fontdb;
18- * use svg2pdf::ConversionOptions ;
19- *
20- * let input = "tests/svg/custom/integration/matplotlib/stairs.svg";
21- * let output = "target/stairs.pdf";
22- *
23- * let svg = std::fs::read_to_string(input)?;
24- * let options = svg2pdf::usvg::Options::default();
25- * let mut db = fontdb::Database::new();
26- * db.load_system_fonts();
27- * let tree = svg2pdf::usvg::Tree::from_str(&svg, &options, &db)?;
28- *
29- * let pdf = svg2pdf::to_pdf(&tree, Options::default(), &db);
30- * std::fs::write(output, pdf)?;
31- * # Ok(()) }
32- * ```
16+ # fn main() -> Result<(), Box<dyn std::error::Error>> {
17+ use svg2pdf::usvg::fontdb;
18+ use svg2pdf::Options ;
19+
20+ let input = "tests/svg/custom/integration/matplotlib/stairs.svg";
21+ let output = "target/stairs.pdf";
22+
23+ let svg = std::fs::read_to_string(input)?;
24+ let options = svg2pdf::usvg::Options::default();
25+ let mut db = fontdb::Database::new();
26+ db.load_system_fonts();
27+ let tree = svg2pdf::usvg::Tree::from_str(&svg, &options, &db)?;
28+
29+ let pdf = svg2pdf::to_pdf(&tree, Options::default(), &db);
30+ std::fs::write(output, pdf)?;
31+ # Ok(()) }
32+ ```
3333
3434## Supported features
3535In general, a very large part of the SVG specification is supported, including
0 commit comments