Configuration and Usage
This document is intended to provide instructions for using the Batik Maven Plugin.
Configuring the Plugin
These settings are used by the rasterize goal.
| Setting | Type | Description |
|---|---|---|
| destinationDirectory | File |
The destinationDirectory setting defines the location where generated images are placed. The default value is ${basedir}/target/rasterized.
|
| dpi | Integer |
The dpi setting defines the resolution of the generated images. The default value is 96.
|
| excludes | Set |
The excludes setting defines a set of exclusion filters used to prevent the rasterizing of SVG images.
|
| height | Double |
The height setting defines the height of generated images.
|
| includes | Set |
The includes setting defines a set of inclusion filters used to select SVG images to be rasterized.
|
| jpegGenerate | Boolean |
The jpegGenerate setting controls if JPEG images are generated or not. The default value is false.
|
| jpegQuality | Double |
The jpegQuality setting controls the quality of JPEG images. Valid value are between 0.0 and 1.0, exclusive, and the default value is 0.99.
|
| pdfGenerate | Boolean |
The pdfGenerate setting controls if PDF documents are generated or not. The default value is false.
|
| pngGenerate | Boolean |
The pngGenerate setting controls if PNG images are generated or not. The default value is false.
|
| sourceDirectory | File |
The sourceDirectory setting defines the location of the source SVG images. The default value is ${basedir}/src/svg.
|
| tiffGenerate | Boolean |
The tiffGenerate setting controls if TIFF images are generated or not. The default value is false.
|
| validate | Boolean |
The validate setting controls whether the source SVG images should be validated. The default value is true.
|
| width | Double |
The width setting defines the width of generated images.
|
Example Configuration
The follow configuration will produce both JPEG and PNG images using all SVG files found in the ${basedir}/src/svg directory. The resolution of the generated images will 200 dpi and will be placed in the ${basedir}/target/generated-images directory:
<plugin>
<groupId>net.sf.doodleproject</artifactId>
<artifactId>batik-maven-plugin</artifactId>
<configuration>
<dpi>200</dpi>
<sourceDirectory>${basedir}/src/svg</sourceDirectory>
<destinationDirectory>
${basedir}/target/generated-images
</destinationDirectory>
<jpegGenerate>true</jpegGenerate>
<pngGenerate>true</pngGenerate>
</configuration>
</plugin>