Skip to main content

svg_to_pdf

Function svg_to_pdf 

Source
pub(crate) fn svg_to_pdf(
    svg_str: &str,
    width_pt: f32,
    height_pt: f32,
) -> Result<Vec<u8>, RError>
Expand description

Convert an SVG string to PDF bytes.

width_pt and height_pt are the page dimensions in points (72 pt = 1 inch), matching the coordinate system used by the SVG renderer.