rsvg-convert(1)

NAME
rsvg-convert - turn SVG files into raster images.

SYNOPSIS
rsvg-convert [options] in.svg > out.png

DESCRIPTION
Converts SVG images into PNG raster images, PDF, PS, or SVG vector images, or dumps of Cairo XML or recording surfaces.

  OPTIONS

-d --dpi-x number
    Set the X resolution of the image in pixels per inch. RSVG's current default is 96dpi

-p --dpi-y number
    Set the Y resolution of the image in pixels per inch. RSVG's current default is 96dpi

-x --x-zoom number
    X Zoom factor, as a percentage. If unspecified, 1.0 is used as the default.

-y --y-zoom number
    Y Zoom factor, as a percentage. If unspecified, 1.0 is used as the default.

-z ---zoom number
    Zoom factor, as a percentage. If unspecified, 1.0 is used as the default.

-w --width length
    Width of the rendered image. A bare number is pixels (PNG) or cairo user units (PDF/PS/EPS), same as before. With a unit (px, pt, pc, in, cm, mm) the length is resolved like GNOME rsvg-convert 2.62: PNG uses CSS pixels at the current DPI; PDF/PS/EPS convert to points (1in = 72pt; px uses DPI). Default is the natural width.

-h --height length
    Height of the rendered image. Same length forms as --width. Default is the natural height.

--page-width number
    Width of the output page. Default is the rendered image width. Must be used together with --page-height. Pixel numbers only (optional px suffix). CSS lengths (mm, in) are not parsed on page flags.

--page-height number
    Height of the output page. Default is the rendered image height. Must be used together with --page-width.

--left number
    Distance between the left edge of the page and the rendered image. Default is 0. Pixel numbers only. Negative values are allowed.

--top number
    Distance between the top edge of the page and the rendered image. Default is 0. If the image plus this offset is larger than the page, the page does not grow; output is clipped.

-f --format [png, pdf, pdf1.4, pdf1.5, pdf1.6, pdf1.7, ps, eps, svg, xml, recording]
    Specify the output format. Default is PNG. pdf is unrestricted Cairo PDF. pdf1.4 through pdf1.7 call cairo_pdf_surface_restrict_to_version. xml and recording are kept.

-o --output filename
    Specify the output filename. If unspecified, outputs to stdout.

-s --stylesheet filename.css
    Apply a CSS stylesheet via rsvg_handle_set_stylesheet. Optional.

-l --accept-language language-tags
    Comma-separated BCP47 language tags (HTTP Accept-Language form), e.g. es-MX,de,en. Selects which systemLanguage / <switch> child to draw. First matching child in document order wins. Without this option, the host locale (LANG) is used. Invalid tags fail with a message and exit 1. Does not change the process locale.

FILE
    Input SVG. Omit the filename or use - to read from stdin.

-a --keep-aspect-ratio
    Specify that the aspect ratio is to be preserved. If unspecified, aspect ratio will not be preserved.

-b --background-color [black, white, #abccee, #aaa...]
    Specify the background color. If unspecified, none is used as the default.

--base-uri uri
    Specify the base URI for SVG files. If unspecified, none is used as the default.

-v --version
    Display the version and a short GNU GPL-2.0-only notice (Copyright (C) 1999-2026 The librsvg C library authors). This program is GNU GPL v2 per LICENCE / COPYING. The library is GNU Library GPL v2 or later per LICENCE-LIB.

--help
    Display a summary of options, followed by the same short GPL-2 notice. There is no --completion flag; bash Tab completion is a file installed with the bin package as /usr/share/bash-completion/completions/rsvg-convert

If no input filename is given, or the filename is -, SVG is read from standard input. When standard input is a terminal, a short licence notice and Reading from standard input / Control-C warning are printed on stderr before waiting for input. A pipe or redirected file does not print that warning.

FILE
    Input SVG. Omit the filename or use - to read from stdin.

MORE INFORMATION
http://librsvg.sourceforge.net/ http://www.w3.org/TR/SVG11/ http://www.gnome.org/

AUTHORS
Dom Lachowicz (cinamod@hotmail.com), Caleb Moore (c.moore@student.unsw.edu.au), and a host of others.