Creates a PNG with extra margin around the card. Fonts are embedded before rasterization for consistent appearance.
svg_to_png_with_margin(
svg_input,
output_path = NULL,
margin = 20,
margin_color = "transparent",
dpi = 300,
background = "transparent"
)Path to the generated PNG file.
SVG string or path to SVG file.
Output path for PNG file (optional; a temp file is used if NULL).
Margin in pixels to add around the card.
Color of the margin area (default transparent).
Resolution in dots per inch.
Background color for the card rasterization (default transparent).