Skip to content
pdfconversionapi

ODF to JPG API

POST /v2/convert/odf/to/jpg returns the print page of an OpenDocument formula file as one JPEG. The sample sends ImageQuality=90 and gets a 1,240 × 1,753 image of 172,520 bytes showing the title row, the typeset loan formula and its source text.

Endpoint
POST /v2/convert/odf/to/jpg
Accepts
odf
Sample timing
0.532 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/odf/to/jpg \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@loan-payment-formula.odf \
  --form-string ImageQuality=90 \
  -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.532 s median1 file, 168 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.532,
  "Files": [
    {
      "FileName": "loan-payment-formula-1.jpg",
      "FileExt": "jpg",
      "FileSize": 172520,
      "FileData": "/9j/4AAQSkZJRgABAgAAAQAB…"
    }
  ]
}

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 loan-payment-formula-1.jpg, rendered by the API
Input
loan-payment-formula.odf (1.8 KB)
Output
loan-payment-formula-1.jpg (168 KB)
Source
Two loan payment formulas with their variables, which we wrote as an OpenDocument formula 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
ImageQualityinteger, default 85JPEG quality; ConvertAPI documents 75 as its default for this pair. The formula page was 120,925 bytes at 50, 157,191 at 85 and 172,520 at 90.Values: 1–100
ImageResolutioninteger, default 150DPI of the A4 page and the density stored in the JPEG when sent. ConvertAPI documents 200 here.Values: 36–600
ImageWidthintegerWidth in pixels, with the height from the A4 shape.Values: 1–20000
ImageHeightintegerHeight in pixels; with a width it sets a box to fit into.Values: 1–20000
ScaleProportionsboolean, default truefalse stretches the page to the exact box you give.
ScaleImageboolean, default truefalse crops from the top-left corner instead of scaling.
ScaleIfLargerboolean, default falsetrue prevents enlarging the page.
BackgroundColorstring, default whitePaints behind the formula, and the formula page has no fill of its own: #fff8e1 at quality 90 gave a cream page of 195,300 bytes.Values: color name, #RRGGBB or R,G,B
ColorSpaceenum, default defaultgray writes a one-channel JPEG: 138,126 bytes at quality 90.Values: default, rgb, gray, monochrome
FileNamestringStem of the name, followed by -1.jpg.
StoreFileboolean, default falseReturn a link that expires after 3 hours instead of the image.

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 ODF files"; the page is A4.

What carries over, and what doesn't

Kept

  • The A4 page with its three frames: title row, typeset formula and source text
  • The 18 pt formula, its fractions and powers, at 150 DPI unless you set another resolution
  • Background colors you set with BackgroundColor, flattened into the image

Lost or not yet supported

  • Exact pixels: at quality 90, 97,840 of the 2,173,720 pixels differ from the PNG of the same page, by up to 19 of 255 levels.
  • Transparency, which JPEG can't hold.
  • Your file name in the title row, which reads "input".

Limits

  • One image per formula file; PageRange accepts only 1.
  • 100,000,000 pixels and 16,000 pixels per side; larger sizes return 413.
  • Formula files saved with a password return 422 "the input file is password-protected" if you leave out Password, and 400 "password-protected ODF files are not supported yet" if you send it. An unprotected file with Password converts as usual: 157,191 bytes at the default quality, as without it.
  • 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

Attaching a formula where only images are accepted

A help desk, forum or chat tool that takes JPEG uploads can receive the formula page as a picture, where an .odf attachment would need a formula editor to open.

Printable handouts on tinted paper

BackgroundColor colors the whole page, so a formula sheet can come out on a light cream or gray background for printing or slides.

One-channel copies

ColorSpace=gray makes a gray JPEG about a fifth smaller than the color one, which this black-on-white page doesn't need anyway.

Questions

Which quality should I pick for a formula?

Thin lines and small indices need a high setting. The sample uses 90 (172,520 bytes), where fewer than 5% of the pixels differ from the lossless PNG and by at most 19 levels; 50 saves about 30% (120,925 bytes). For exact pixels, use the PNG route.

Can I change the page color?

Yes. Unlike drawing pages, a formula page has no fill of its own, so BackgroundColor=#fff8e1 turned the whole page, inside the frames as well, to that cream color.

Why is the JPEG a whole A4 page instead of the formula alone?

The formula is converted the way it prints: on an A4 page with a title row and the source text. There's no option to crop to the formula yet.

Convert your first ODF file in a minute.