Skip to content
pdfconversionapi

ODG to WebP API

POST /v2/convert/odg/to/webp gives you each page of an OpenDocument drawing as a lossless WebP. The 2-page sample returns two 1,650 × 1,275 images of 77,522 and 60,662 bytes, less than half the size of the same pages as PNG.

Endpoint
POST /v2/convert/odg/to/webp
Accepts
odg
Sample timing
0.562 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/odg/to/webp \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@maker-fair-floor-plan.odg \
  -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.562 s median2 files, 135 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.562,
  "Files": [
    {
      "FileName": "maker-fair-floor-plan-1.webp",
      "FileExt": "webp",
      "FileSize": 77522,
      "FileData": "UklGRsouAQBXRUJQVlA4TL0u…"
    },
    {
      "FileName": "maker-fair-floor-plan-2.webp",
      "FileExt": "webp",
      "FileSize": 60662,
      "FileData": "UklGRu7sAABXRUJQVlA4TOHs…"
    }
  ]
}

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 maker-fair-floor-plan-1.webp, rendered by the API
Input
maker-fair-floor-plan.odg (4.4 KB)
Output
maker-fair-floor-plan-1.webp (76 KB)maker-fair-floor-plan-2.webp (59 KB)
Source
A two-page floor plan and booth directory for a fictional maker fair, which we wrote as an OpenDocument drawing by hand (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
ImageResolutioninteger, default 150Sets the pixel size only; WebP has no DPI field to store it in. At 96 the hall page was 1,056 × 816 and 47,796 bytes.Values: 36–600
ImageWidthintegerWidth in pixels: 1024 gave a 1,024 × 791 image of 46,252 bytes.Values: 1–20000
ImageHeightintegerHeight in pixels; the width follows the page shape unless both are set.Values: 1–20000
ScaleProportionsboolean, default trueWhen both sizes are given, false stretches the page to them instead of fitting it inside.
ScaleImageboolean, default truefalse returns a top-left crop of the requested size, unscaled.
ScaleIfLargerboolean, default falsetrue keeps a page that is already smaller than the requested size as it is.
TransparentColorstringClears one exact color. With white, 1,591,447 pixels of the hall page became transparent and the file grew to 83,220 bytes.Values: color name, #RRGGBB or R,G,B
ColorSpaceenum, default defaultgray turns the colors to grays (41,684 bytes for the hall page), but WebP has no gray mode, so the file is still an RGB image.Values: default, rgb, gray, monochrome
PageRangestringPages to convert; 2 returns only the booth directory.
PasswordstringOpens a drawing saved with a password.
FileNamestringStem for the numbered .webp files.
StoreFileboolean, default falseReturn links instead of the files; they expire after 3 hours.

Not supported yet

Setting one of these to anything but its default returns 400.

OptionWhat to do instead
PageSize400 "PageSize is not supported yet for ODG files".

Also refused when set: PageOrientation.

What carries over, and what doesn't

Kept

  • Every pixel of the rendered page: the output is lossless WebP, so flat fills and thin lines show no compression artifacts
  • One image per page, in page order, 1,650 × 1,275 at the default 150 DPI
  • No alpha channel unless TransparentColor is set, which adds one

Lost or not yet supported

  • A quality setting: the images are always lossless, and ImageQuality=40 returned the same 77,522-byte page.
  • Resolution metadata: WebP has no DPI field, so ImageResolution changes only the pixel size.
  • Text as text, and shapes on layers that are hidden or don't print.

Limits

  • Images up to 100,000,000 pixels and 16,000 pixels per side; bigger requests return 413.
  • Options this pair doesn't use, such as ImageQuality, MultiPage or TiffType, are ignored instead of refused.
  • Up to 10 MB on the Free plan or 100 MB on paid plans per request and 120 seconds per conversion.

Where teams use it

Lighter diagrams on web pages

Event sites, help centers and intranets can show a floor plan or diagram as WebP: the hall page is 77,522 bytes as WebP and 156,740 as PNG, with the same pixels.

Page previews in a web app

An app can show each drawing page as an image, at the width its layout needs (ImageWidth=1024 gave 46,252 bytes), without sending the .odg file or a PDF viewer to the browser.

Overlays with a clear background

TransparentColor=white gives shapes on a transparent background for a map or dashboard layer.

Questions

Are the WebP files lossy or lossless?

Lossless. Each file is a VP8L WebP, so it matches the PNG output pixel for pixel while being smaller: 77,522 against 156,740 bytes for the hall page.

Can I make the WebP smaller?

Lower the pixel size with ImageWidth or ImageResolution. ImageWidth=1024 gave 46,252 bytes and 96 DPI gave 47,796 bytes. ImageQuality has no effect on this route.

Does `ColorSpace=gray` make a one-channel file?

No. The colors become grays and the file shrinks to 41,684 bytes, but WebP has no one-channel mode, so the file still decodes as red, green and blue.

Convert your first ODG file in a minute.