← 返回命令列表

Linux command

rsvg-convert 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert SVG to PNG

rsvg-convert [input.svg] -o [output.png]

Convert to PDF

rsvg-convert -f pdf [input.svg] -o [output.pdf]

Resize output

rsvg-convert -w [800] -h [600] [input.svg] -o [output.png]

Set DPI

rsvg-convert -d [300] [input.svg] -o [output.png]

说明

rsvg-convert renders SVG files to various raster and vector formats. It uses the librsvg library for high-quality SVG rendering.

参数

-o, --output _file_
Output file.
-f, --format _format_
Output format (png, pdf, ps, eps, svg).
-w, --width _px_
Width in pixels.
-h, --height _px_
Height in pixels.
-d, --dpi-x _dpi_
Horizontal DPI.
-p, --dpi-y _dpi_
Vertical DPI.
-a, --keep-aspect-ratio
Preserve aspect ratio.
-b, --background-color _color_
Background color.

FAQ

What is the rsvg-convert command used for?

rsvg-convert renders SVG files to various raster and vector formats. It uses the librsvg library for high-quality SVG rendering.

How do I run a basic rsvg-convert example?

Run `rsvg-convert [input.svg] -o [output.png]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -o, --output _file_ do in rsvg-convert?

Output file.