Conversion Options

Every POST /v1/convert job can take an options object that tunes how the PDFFLY engine produces your output. This page explains how options work and lists every supported option, grouped by the output format(s) it affects.

How options work

Worked example

Convert to DWG with a specific AutoCAD version and PDF-layer mapping:

curl -X POST https://api.visual-integrity.com/v1/convert \
  -H "Authorization: Bearer vi_your_api_key" \
  -F "file=@drawing.pdf" \
  -F "output_format=dwg" \
  -F 'options={"dxf_appl":"autocad2004","dxf_layers":"DXF_PDFLAYERS","chars2paths":"1"}'

AutoCAD version: dxf_appl accepts only autocad2004, autocad2000, or cadra. Any other value (e.g. autocad2018) is automatically treated as autocad2004 — it does not error, but it also does not give you a newer format.

Reading the tables

Each option lists the format(s) it applies to, its type/accepted values, its default, and what it does. Defaults are the values the API advertises; a format's own presets may set a different effective default.

General — all formats

OptionType / valuesDefaultDescription
insert_asANCHOR | PAGEANCHORANCHOR = drawing bounding box; PAGE = full page dimensions
page_sizeAUTOMATIC | LETTER | A4 | CUSTOMAUTOMATICOutput page size. CUSTOM also needs page_width + page_height
rotate0 | 90 | 180 | 2700Rotate output by degrees (alias: rotation)
hflip0 | 10Flip horizontally
vflip0 | 10Flip vertically
page_rangestring, e.g. 1, 1-3, 1,3,5-7allPages to convert; blank = all
bboxmarginnumber 0–50 (mm)0Extra whitespace margin around the drawing (alias: bbox_margin)
clipping0 | 11Respect PDF clipping commands
ignore_pathobjects0 | 10Drop path/vector objects (alias: ignore_paths)
ignore_textobjects0 | 10Drop text objects (alias: ignore_text)
ignore_imageobjects0 | 10Drop embedded image objects (alias: ignore_images)

Text & line rendering — vector formats (DWG, DXF, SVG, EMF, WMF, CGM, EPS, PS)

OptionType / valuesDefaultDescription
chars2string1 | 2 | 32Combine glyphs into strings (alias: chars_to_string)
chars2paths0 | 1 | 20Render characters as Bézier curves (alias: chars_to_paths)
scaletextnumber 0.1–101.0Scale text-string height (alias: scale_text)
font_warnings0 | 11Show missing-font warnings (0 = suppress)
min_linewidthnumber 0–10 (mm)0Minimum line width per vector object (also applies to HPGL)
linestyle0 | 111 = use line-style attributes; 0 = render as segments for exact WYSIWYG

CAD — DWG & DXF

OptionType / valuesDefaultDescription
dxf_applautocad2004 | autocad2000 | cadraautocad2004Target CAD version (alias: dxf_version; other values clamp to autocad2004)
dxf_layersDXF_PDFLAYERS | DXF_COLORLAYERS | DXF_LINEWLAYERS | DXF_ATTRLAYERS | DXF_ADVCOLORLAYERSDXF_PDFLAYERSHow objects map to DXF layers
dxf_unittype0 | 110 = inch, 1 = mm (alias: dxf_unit_type)
multipagedxfSINGLE | MERGE | ADDH | ADDV | LAYERSINGLEMultipage handling (alias: dxf_multipage)
dxf_fit0 | 11Ensure the drawing is fully visible when opened in CAD
hidden_text0 | 1 | 2 | 30Hidden text: 0=ignore, 1=include, 2=render white, 3=transparent (alias: dxf_hidden_text)
zero_linewidth0 | 10Set all line weights to 0
dxf_whitefill0 | 10Ignore white-filled objects (alias: dxf_white_fill)
dxf_path2poly0 | 10Represent paths as polylines/polygons (alias: dxf_path_to_poly)
dxf_compoundpaths0 | 11Convert compound paths as single objects (alias: dxf_compound_paths)
dxf_custls0 | 10Map PDF line styles to custom DXF line styles (alias: dxf_custom_linestyles)
pathto0 | 11Recognize circles/ellipses from closed polygons. Boolean wrapper — the API takes 0/1; internally 1 → the engine's PATH2ELLIPSE (on), 0 → PATH2PATH (off). Pass 0/1, not the raw engine strings (alias: path_to)
dashlines0 | 10Recognize dashed H/V lines as one styled object (alias: dash_lines)
dxf_imagetransparency0 | 1 | 200=off, 1=b&w images transparent, 2=all images transparent (alias: dxf_image_transparency)
dxf_softmask0 | 10Convert 8-bit-softmask images to PNG with alpha

Raster images — PNG, TIFF, JPG, BMP, GIF

OptionApplies toType / valuesDefaultDescription
tiff_dpiall rasternumber 72–1200150Output resolution in DPI (aliases: dpi, resolution)
image_fit_widthall rasternumber 0–10000 (px)0Scale to this width; 0 = use DPI. Aspect preserved
image_fit_heightall rasternumber 0–10000 (px)0Scale to this height; 0 = use DPI
tiff_bppTIF, BMP, GIF, PNGtruecolor | colormap | b&wcolormapColor depth (24 / 8 / 1-bit)
image_qualityall rasterSMOOTH | BASICSMOOTHSMOOTH = antialiased; BASIC = none
image_quality_factorJPG onlynumber 1–100100JPEG quality; lower = smaller file (alias: jpeg_quality)
multipagetiffTIF only0 | 10Combine all pages into one multipage TIFF (alias: tiff_multipage)
tiff_cmykTIF only0 | 10Output CMYK TIFF instead of RGB
jpg_cmykJPG only0 | 10Output CMYK JPEG instead of RGB
image_pdfcropall raster0 | 10Trim white space around the image (computes bounding box) (alias: image_pdf_crop)
gif_transparencyGIF only0 | 10Transparent GIF background

SVG

OptionType / valuesDefaultDescription
svg_applADOBE | FOPADOBEOptimize for Adobe SVG Viewer or Apache Batik/FOP (alias: svg_application)
svg_rasterINCLUDED | REFERENCEDINCLUDEDEmbed raster in the SVG, or reference external .jpg files
embed_font0 | 10Embed fonts in the SVG
svg_kerning0 | 202 = use tspan for character positioning
viewport_scalenumber 1–1000 (%)100Scale SVG output by percent (aliases: scale, svg_viewport)

EMF / WMF

OptionType / valuesDefaultDescription
emf_kerning0 | 1 | 200 = none, 1 = character widths, 2 = position-based
donotflip0 | 10Set 1 only if embedded images appear flipped (alias: emf_do_not_flip)
dither0 | 11Dither color images to 256-color (alias: emf_dither)

EPS

OptionType / valuesDefaultDescription
eps_fittopage0 | 10Scale EPS output to LETTER page size (alias: eps_fit_to_page)
eps_cmyk0 | 10Use the CMYK color model

CGM

OptionType / valuesDefaultDescription
cgmlevel1 | 2 | 3 | 41CGM specification level
cgm_applATA | NONEATAATA iSpec 2200 profile, or generic CGM
cgm_metric0 | 10Enable metric scaling

HPGL

OptionType / valuesDefaultDescription
hpgl_plot_unitnumber 1–100040HPGL plot-unit value

Text — TXT

OptionType / valuesDefaultDescription
doc_typeFORM | DOCFORMFORM = preserve spatial layout; DOC = flowing text document
ascii_formatISO8859 | UTF8 (also accepted as UTF-8) | UNICODEISO8859Output text encoding. UTF8 writes UTF-8 but keeps the same character substitutions as ISO8859 (for example typographic quotes become straight ones, a Symbol-font μ becomes m, and on some files even a micro sign µ in Helvetica does). UNICODE keeps the characters and writes UTF-8 without a byte-order mark (before v2.17.0: UTF-16 with a byte-order mark). Any other value is refused with 400 invalid_options
decr_pointsizenumber 0–200Decrease all font sizes by x pts — helps column integrity in tables
abs_pointsizenumber 0–720Force an absolute point size (0 = keep original)
kerningnumber −10–10 (mm)0Decrease character width by this value
leadingnumber −20–20 (pts)0Add to the baseline spacing between lines
basedeltanumber 0–20 (mm)0Merge strings onto one line when their baseline delta is below this
autorotation0 | 10Auto-rotate landscape pages for better text extraction

Notes & caveats