Generate preview image for vector artwork

Generate preview image for vector artwork

The vectorArtPreview API method converts a vector file — e.g. PDF, SVG, etc — to a transparent PNG image with a transparent background. The resulting image’s transparent edges are trimmed automatically. Optionally, you can specify DPI for resolution quality. The default is generated at 96 DPI.


POST parameters

ParameterTypeRequiredDescription
appIdStringApp ID from your Wilcom Developer Portal account.
appKeyStringApp Key from your Wilcom Developer Portal account.
requestXml
String
An XML string specifying the vector file to process.


XML structure

<xml>
  <vector file="logo.pdf" dpi="150" remove_background="true" />   <!-- Vector processing instructions -->
  <files>
    <file filename="logo.pdf" filecontents="..." />        <!-- Vector file to process -->
  </files>
</xml>


Response

On success, the API returns an XML string containing the processed PNG image:
<xml>
  <files>
    <file filename="logo.png" filecontents="..." />  <!-- Transparent PNG result -->
  </files>
</xml>

XML components

ComponentDetails
<vector>Specifies which vector file in <files> will be processed. 
<files>Contains the input vector file and the resulting design and TrueView file(s). 


Remarks

Remark
Details
File support
Accepts standard vector formats like PDF, SVG, EPS. 
DPI (resolution)
Optional. Accepts values from 1–480 (default is 96 DPI).
Background removal
Automatically removes white/solid backgrounds. Controlled by remove_background attribute (default: true).
Transparent edge trimming
PNG output has cropped edges to remove whitespace.