| Crates.io | skia-rs-pdf |
| lib.rs | skia-rs-pdf |
| version | 0.2.0 |
| created_at | 2026-01-02 20:57:27.601019+00 |
| updated_at | 2026-01-03 18:47:35.004377+00 |
| description | PDF generation for skia-rs |
| homepage | https://github.com/pegasusheavy/skia-rs |
| repository | https://github.com/pegasusheavy/skia-rs |
| max_upload_size | |
| id | 2019183 |
| size | 119,795 |
PDF generation for skia-rs, a pure Rust implementation of the Skia 2D graphics library.
use skia_rs_pdf::{PdfDocument, PdfPage};
// Create a document
let mut doc = PdfDocument::new();
// Add a page
let mut page = PdfPage::new(612.0, 792.0); // Letter size
let canvas = page.canvas();
// Draw on the page (same API as Surface)
canvas.draw_rect(&rect, &paint);
canvas.draw_string("Hello, PDF!", 100.0, 100.0, &font, &paint);
doc.add_page(page);
// Save to file
doc.save("output.pdf")?;
MIT OR Apache-2.0
See the main repository for more information.