Vector recipe

Vector recipe

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:

  1. api/vectorArtPreview
  2. api/vectorArtTrueview
  3. api/vectorArtDesign

Attributes

These attributes define the vector input file and its options...
Attribute
Type
Details
filestring
  1. Required. Filename of the vector file — e.g. logo.pdf, design.svg.
  2. Must match an entry in the <files> XML block.
dpi
integer
  1. Optional. Sets the resolution (dots per inch) for rasterizing the vector file when generating a preview.
  2. Valid range: 0–480.
  3. If omitted or set to 0, defaults to 96.
  4. Only applicable to: api/vectorArtPreview
remove_background
boolean
  1. Optional. Controls post-processing of the rasterized image.
  2. If true (default), EWA attempts to remove flat-color or vector backgrounds.
  3. Useful when the vector includes embedded bitmaps or full-background shapes.
  4. Behaves like bitmapArtPreview post-conversion.

Remarks

  1. The file attribute must match a file entry in the <files> XML and must reference the exact filename.
  2. The dpi setting controls preview quality for vector files — higher DPI can improve image detail but may increase processing time.
  3. 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.
  4. Background removal ensures cleaner output when the vector includes bitmap images or unwanted background elements.
  5. Future versions of the API may support additional vector processing parameters.