Apache::AxKit::Language::Svg2AnyFormat - SVG Serializer
AddHandler axkit .svg ## Fairly important to cache the output because ## transformation is highly CPU-Time and Memory consuming AxCacheDir /tmp/axkit_cache ## When using SvgCgiSerialize this is vital ## because the cgi-parameters are not used ## by default to build the cache AxAddPlugin Apache::AxKit::Plugin::QueryStringCache <Files ~ *.svg> AxAddStyleMap application/svg2anyformat Apache::AxKit::Language::Svg2AnyFormat AxAddProcessor application/svg2anyformat NULL ## optional with this variable you can ## overwrite the default output format ## PNG ## Supported Values: ## image/jpeg ## image/png ## image/gif ## application/pdf PerlSetVar SVGOutputMimeType image/jpeg ## optional module to pass the format using cgi-parameters ## to the module. For supported values see above ## and the man-page of the plugin AxAddPlugin Apache::AxKit::Plugin::SvgCgiSerialize </Files>
AddHandler axkit .svg ## Fairly important to cache the output because ## transformation is highly CPU-Time and Memory consuming AxCacheDir /tmp/axkit_cache ## When using SvgCgiSerialize this is vital ## because the cgi-parameters are not used ## by default to build the cache AxAddPlugin Apache::AxKit::Plugin::QueryStringCache <Files ~ *.svg> AxAddStyleMap application/svg2anyformat Apache::AxKit::Language::Svg2AnyFormat AxAddProcessor application/svg2anyformat NULL ## optional with this variable you can ## overwrite the default output format ## PNG ## Supported Values(Native Formats): ## image/png ## If you specify any other format: ## svg->png is done by Image::LibRSVG ## png->chosen format Image::Magick PerlSetVar SVGOutputMimeType image/jpeg PerlSetVar SVGOutputSerializer LibRSVG ## optional module to pass the format using cgi-parameters ## to the module. For supported values see above ## and the man-page of the plugin AxAddPlugin Apache::AxKit::Plugin::SvgCgiSerialize </Files>
Svg2AnyFormat is a serializer which can transform SVG to many different output formats(e.g. png, jpg, ... ). At the moment it uses Image::Magick or LibRSVG as conversion libraries which do not support the whole set of svg features. In one case the conversion could work in another not. You have to give it a try. Please note because Svg2AnyFormat to any format is a searializer it HAS TO BE LAST in the transformer chain!!!!
Please note when referencing external material (e.g. Images) you'll have to use an absolute path
If no SVGOutputSerializer is set Image::Magick is used as default. The reason is simply because of backward compatility. You could also set Image::Magick explicitly with
PerlSetVar SVGOutputSerializer ImageMagick
Nearly any format can be exported
known to work on many os
it's fairly big
it does not support as much of the SVG-Spec as LibRSVG
LibRSVG is part of the gnome project. And could also be used as SVG-Serializer at the moment the only really supported output-format is PNG. As a matter of that if you want to use LibRSVG as your SVG-Serializer and the output format is an other than PNG, LibRSVG is used to transform the SVG to PNG and ImageMagick from PNG to the desired output format.
PerlSetVar SVGOutputSerializer LibRSVG
supports more of SVG-spec than Image::Magick
not that big
* Perl-Module highly experimental
only PNG supported as output format. This is solved by using Image::Magick in a second transformation step (LOW Performance!!!).
0.03
Apache::AxKit::Plugin::SvgCgiSerialize
Tom Schindl <tom.schindl@bestsolution.at>
To install Apache::AxKit::Language::Svg2AnyFormat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::AxKit::Language::Svg2AnyFormat
CPAN shell
perl -MCPAN -e shell install Apache::AxKit::Language::Svg2AnyFormat
For more information on module installation, please visit the detailed CPAN module installation guide.