The vector XML element is used to reference a vector file — e.g. PDF, SVG — and configure how it is processed for previews and design generation.
XML structure
<vector <!-- Root element: vector
recipe -->
file="logo.pdf" <!-- Name of the vector file (must match a file in <files>) -->
dpi="96" <!-- DPI for preview quality (0–480, default: 96) -->
remove_background="true" <!-- Whether to auto-remove background after rasterization -->
/>
Usage
The vector XML string is used in the input of:
- api/vectorArtPreview
- api/vectorArtTrueview
- api/vectorArtDesign
Attributes
These attributes define the vector input file and its options...
Attribute | Type | Details |
| file | string | - Required. Filename of the vector file — e.g. logo.pdf, design.svg.
- Must match an entry in the <files> XML block.
|
dpi | integer | - Optional. Sets the resolution (dots per inch) for rasterizing the vector file when generating a preview.
- Valid range: 0–480.
- If omitted or set to 0, defaults to 96.
- Only applicable to: api/vectorArtPreview
|
remove_background | boolean | - Optional. Controls post-processing of the rasterized image.
- If true (default), EWA attempts to remove flat-color or vector backgrounds.
- Useful when the vector includes embedded bitmaps or full-background shapes.
- Behaves like bitmapArtPreview post-conversion.
|
- The file attribute must match a file
entry in the <files> XML and must reference the exact filename.
- The dpi setting controls preview quality
for vector files — higher DPI can improve image detail but may increase
processing time.
- When remove_background
is true, the API treats the output similarly to the Bitmap Art process,
converting the vector to a bitmap and cleaning up the background.
- Background removal ensures cleaner output when the vector includes bitmap images or unwanted background elements.
- Future versions of the API may support additional vector processing parameters.