Skip to content
pdfconversionapi

ORA to SVG API

Send an .ora to /v2/convert/ora/to/svg and the API composites its layers, scales the result if you ask, and traces it into filled SVG paths. The sample passes ImageWidth=800, because the plan's small labels break apart when traced at their native 400 px.

Endpoint
POST /v2/convert/ora/to/svg
Accepts
ora
Sample timing
0.428 s median of 5 runsHow we measure
Request size
Up to 10 MB on the Free plan or 100 MB on paid plans, all files together

Request and response

Every sample below ran against the API before this page was published. Set PDFCONVERSIONAPI_KEY to your key and run it as is.

curl -sS -X POST \
  https://api.pdfconversionapi.com/v2/convert/ora/to/svg \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@garden-plan.ora \
  --form-string ImageWidth=800 \
  -o response.json

# FileData is base64. Save the first file in converted/,
# or print the JSON error.
if jq -e '.Files' response.json > /dev/null; then
  mkdir -p converted
  name=$(jq -r '.Files[0].FileName' response.json)
  jq -r '.Files[0].FileData' response.json \
    | base64 --decode > "converted/$name"
else
  cat response.json
fi
200 OK0.428 s median1 file, 349 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.428,
  "Files": [
    {
      "FileName": "garden-plan.svg",
      "FileExt": "svg",
      "FileSize": 357371,
      "FileData": "PD94bWwgdmVyc2lvbj0iMS4w…"
    }
  ]
}

Response from our test run on 2026-11-03. ConversionTime shows the median of 5 runs. FileData is shortened here; the real response carries the whole file as base64.

The sample, converted

The same file the code sends. Download the input and the output and compare them yourself.

First page of garden-plan.svg, rendered by the API
Input
garden-plan.ora (123 KB)
Output
garden-plan.svg (349 KB)
Source
A backyard vegetable garden plan that we drew and saved as an OpenRaster file with seven layers and a layer group, including a hidden layer and a multiply layer. (CC0-1.0). How it was made
Made by
2026-11-04, API build 9eeeb0640aba

Parameters

Send these as form fields next to the file. Names are case-insensitive. If you set one of the documented options below that we don't support yet, the request fails with a 400 that names it instead of returning a file made without it.

ParameterWhat it does
ImageWidthintegerResamples the composite before tracing. At 800 the plan gave 779 paths in 357,371 bytes with legible labels; at its own 400 px, 360 paths and broken text. A 4:3 canvas can go up to 4,000 px wide.Values: 1–20000; at most 12,000,000 pixels
ImageHeightintegerResamples by height, or bounds the box with a width.Values: 1–20000
ScaleProportionsboolean, default truefalse traces a copy stretched to the exact box.
ScaleIfLargerboolean, default falsetrue cancels upscaling, which on this route also cancels the sharper trace you get from it.
ScaleImageboolean, default truefalse traces only the top-left crop (103 paths for 200 × 100).
ColorModeenum, default colorbw produces a one-color line drawing: 53 paths and 32,357 bytes for the plan at 400 px.Values: color, bw
Presetenum, default noneBundled settings; at 400 px, photo merged the plan into 100 paths and poster split it into 447.Values: none, bw, poster, photo
FilterSpeckleinteger, default 4Patches with an area below this value squared are dropped, under 16 pixels at the default 4. Traced at the plan's own 400 px, 0 gave 5,552 paths (539,617 bytes) and 16 only 89.Values: 0–128
ColorPrecisioninteger, default 6Bits kept per channel when grouping colors; at 400 px, 3 reduced the plan to 65 paths and 30,085 bytes.Values: 1–8
GradientStepinteger, default 16Color difference needed to start a new layer of paths; 40 gave 222 paths at 400 px. ConvertAPI documents 10 for PNG to SVG.Values: 0–128
Layeringenum, default stackedcutout produces non-overlapping shapes (297 paths at 400 px).Values: stacked, cutout
CurveModeenum, default splinepolygon suits the plan's straight beds and paths (41,264 bytes at 400 px); pixel keeps stair-step edges (65,235 bytes).Values: spline, polygon, pixel
CornerThresholdinteger, default 60Turns sharper than this stay corners. ConvertAPI documents 55 for PNG to SVG.Values: 0–180 (degrees)
SegmentLengthnumber, default 4Curve segment length; 10 gave 106,604 bytes at 400 px.Values: 3.5–10
SpliceThresholdinteger, default 45Angle that splits a spline. ConvertAPI documents 35 for PNG to SVG.Values: 0–180 (degrees)
FileNamestringName of the returned SVG.
StoreFileboolean, default falseReturn a 3-hour link instead of the SVG text.

What carries over, and what doesn't

Kept

  • Flat-color regions as filled paths: 779 paths in 419 colors for the sample at 800 px
  • Labels, if the image is scaled up enough before tracing
  • The canvas proportions; the SVG's width and height are the traced size (800 × 600 for the sample)

Lost or not yet supported

  • Small text at native size. Traced at 400 px, the plan's labels broke into fragments.
  • Fine lines: the paper's faint grid is partly dropped and partly traced as slivers, depending on FilterSpeckle.
  • Layers, which become color regions with no link to the OpenRaster stack.
  • A viewBox; add one if the SVG must resize with CSS.

Limits

  • One .ora per request, canvas up to 100,000,000 pixels, sides up to 300,000 px.
  • Tracing stops at 12,000,000 pixels: 4,000 × 3,000 worked for the plan, 4,001 px wide returned 413.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
  • 120 seconds per conversion, then 504.

Where teams use it

Vector copies of layered plans

Diagrams and plans with flat fills, like the garden sample, trace into shapes you can recolor or scale in a vector editor. CurveMode=polygon keeps straight edges straight.

Line art for plotters and laser cutters

ColorMode=bw turns a drawing into one-color paths, a starting point for plotting or cutting, after cleanup.

Questions

Why does the sample use ImageWidth=800?

Tracing follows pixel edges, and the plan's label text is small at 400 px, so the letters came apart. Doubling the size before tracing made them readable, at the cost of a larger file: 357,371 bytes instead of 131,410.

Does the SVG keep the OpenRaster layers?

No. The layers are composited first and the flat result is traced, so paths follow areas of color. A label and the bed under it are separate shapes only because their colors differ.

How do I make the file smaller?

Raise FilterSpeckle (at 400 px, 16 cut the plan from 360 paths to 89), lower ColorPrecision (3 gave 65 paths at that size) or use CurveMode=polygon. Each one trades detail for size, so check the labels after changing them.

Convert your first ORA file in a minute.