RASTERIZER(1)
π RASTERIZER(1) β User Commands, bestie edition
okay so you opened the manual page for rasterizer β section 1, User Commands, the real ones β and honestly? it's giving "tiny command, huge energy" because this little thing converts your SVG files into basically everything you'd ever want. π Let's get into it, no cap.
β¨ NAME β¨
rasterizer β SVG conversion π¦
β¨ SYNOPSIS β¨
rasterizer [options] files
that's it. that's the whole vibe. options, then files, go. πΈ
β¨ DESCRIPTION β¨
So Rasterizer is a program that takes your SVG files and converts them into various formats, namely PNG, JPEG and PDF. That's the whole job and it does it beautifully. π
β¨ OPTIONS β¨
Okay bestie, quick heads-up before we dive in: this manpage literally lists the options twice. Not me making that up β it's right there in the source. So we're doing round one, then round two, and round two has a couple of extra little details. Read both, iykyk. π«Ά
Round one π
-d <dir|file>β output directory. and if you've only got a single input file? then this can be a file instead. slay.-m <mimeType>β output mime type. should be one ofimage/jpg,image/jpeg,image/jpe,image/png,image/tifforapplication/pdf.-w <width>β output width. it's a floating point value, so yes you can be precise about it. β¨-h <height>β output height. also a floating point value.-maxw <width>β Maximum output width. floating point value, again.-maxh <height>β Maximum output height. floating point value, again again.-a <area>β output area. the format for area isx,y,w,h, wherex,y,wandhare all floating point values.-bg <color>β output color. the format for color isa.r.g.b, wherea,r,gandbare integer values.-cssMedia <media>β CSS media type for which the source SVG files should be converted.-cssAlternate <alternate>β CSS alternate stylesheet to use when converting the source SVG files.-cssUser <userStylesheet>β CSS user stylesheet URI to apply to converted SVG documents, on top of any other referenced or embedded stylesheets.-font-family <defaultFontFamily>β the value used as a default when nofont-familyvalue is specified.-lang <userLanguage>β User language to use when converting SVG documents.-q <quality>β Quality for the output image. this one is only relevant for theimage/jpegmime type, so don't come crying to it about your PNGs. π-indexed (1|2|4|8)β Reduces the image to the given number of bits per pixel using an adaptive palette, resulting in an Indexed image. currently only supported for PNG conversion. π¨-dpi <resolution>β Resolution for the output image.-validateβ Controls whether the source SVG files should be validated.-onloadβ Controls if the source SVG files must be rasterized after dispatching the'onload'event.-scriptSecurityOffβ removes any security check on the scripts running as a result of dispatching theonloadevent.-anyScriptOriginβ controls whether scripts can be loaded from any location. By default, scripts can only be loaded from the same location as the document referencing them.-scripts <listOfAllowedScripts>β List of script types (i.e., values for thetypeattribute in the<script>tag) which should be loaded.
Round two π¦ (yes, for real, it's listed again)
-d <dir|file>β output directory. If there is a single input file, this can be a file.-m <mimeType>β output mime type.-w <width>β output width. This is a floating point value.-h <height>β output height. This is a floating point value.-maxw <width>β Maximum output width. This is a floating point value.-maxh <height>β Maximum output height. This is a floating point value.-a <area>β output area. The format for area isx,y,w,h, wherex,y,wandhare floating point values.-bg <color>β output color. The format for color isa.r.g.b, wherea,r,gandbare integer values.-cssMedia <media>β CSS media type for which the source SVG files should be converted.-cssAlternate <alternate>β CSS alternate stylesheet to use when converting the source SVG files.-cssUser <userStylesheet>β CSS user stylesheet URI to apply to converted SVG documents in addition to any other referenced or embedded stylesheets.-font-family <defaultFontFamily>β Value used as a default when nofont-familyvalue is specified.-lang <userLanguage>β User language to use when converting SVG documents.-q <quality>β Quality for the output image. This is only relevant for theimage/jpegmime type.-indexed (1|2|4|8)β Reduces the image to given number of bits per pixel using an adaptive palette, resulting in an Indexed image. This is currently only supported for PNG conversion.-dpi <resolution>β Resolution for the output image.-validateβ Controls whether the source SVG files should be validated.-onloadβ Controls if the source SVG files must be rasterize after dispatching the'onload'event.-scriptSecurityOffβ removes any security check on the scripts running as a result of dispatching theonloadevent. Always enabled, as in most cases, rasterizer just fails to run without this option. See-scriptSecurityOn. π-scriptSecurityOnβ If this is the first argument on the command-line, turn security back on. You'll most likely be hit by the possible bug mentioned below. π-anyScriptOriginβ controls whether scripts can be loaded from any location. By default, scripts can only be loaded from the same location as the document referencing them.-scripts <listOfAllowedScripts>β List of script types (i.e., values for thetypeattribute in the<script>tag) which should be loaded.
π BUGS π
okay so if rasterizer fails with an error in the spirit of:
Exception in thread "main" java.security.AccessControlException: access
denied (java.util.PropertyPermission java.security.policy write)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at
java.security.AccessController.checkPermission(AccessController.java:546)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at
java.lang.System.setProperty(System.java:727)
then bestie, run it with the -scriptSecurityOff option on. π«Ά It seems in some cases the security design is slightly too strong. This might become the default some day. (not a promise, just what the page says, don't @ me)
π§ JAVA-WRAPPERS NOTE π§
This program is a shell script wrapper based on java-wrappers(7). So you benefit from several features β please see the java-wrappers(7) manual page for more information about them. β¨
πΈ AUTHORS πΈ
rasterizer is part of batik, written by the Apache Software Foundation.
This manual page was written by Vincent Fourmond <fourmond@debian.org> for the Debian Project, but may be used by others. iconic behavior tbh. π
π₯ SEE ALSO π₯
- The web page of batik,
http://xml.apache.org/batik java-wrappers(7)
and that's the whole page, bestie π β SVG conversion, brought to you by the January 2008 edition of this fine manual. go forth and rasterize responsibly. π
π¦ where this page comes from
- debian bookworm: libbatik-java 1.16+dfsg-1+deb12u1 Β· Apache-2.0
- debian trixie: libbatik-java 1.18+dfsg-2 Β· Apache-2.0
- ubuntu jammy: libbatik-java 1.14-1 Β· Apache-2.0
- ubuntu jammy: libbatik-java 1.14-1ubuntu0.2 Β· Apache-2.0
- ubuntu noble: libbatik-java 1.17+dfsg-1 Β· Apache-2.0
- ubuntu questing: libbatik-java 1.18+dfsg-2
- ubuntu resolute: libbatik-java 1.18+dfsg-2build1 Β· Apache-2.0
- ubuntu stonking: batik 1.19-2 Β· Apache-2.0
- Copyright 2007 by Vincent Fourmond
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms