ODF to TIFF API
POST /v2/convert/odf/to/tiff renders an OpenDocument formula file's A4 print page as an uncompressed TIFF. The sample sends ColorSpace=gray and ImageResolution=60 and gets a one-channel 496 × 701 image of 347,894 bytes, tagged 60 DPI.
- Endpoint
- POST /v2/
convert/ odf/ to/ tiff - Accepts
- odf
- Sample timing
- 0.543 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/tiff \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@loan-payment-formula.odf \
--form-string ColorSpace=gray \
--form-string ImageResolution=60 \
-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
fiimport base64
import os
import requests
key = os.environ["PDFCONVERSIONAPI_KEY"]
response = requests.post(
"https://api.pdfconversionapi.com/v2/convert/odf/to/tiff",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("loan-payment-formula.odf", "rb"))],
data={
"ColorSpace": "gray",
"ImageResolution": "60",
},
timeout=180,
)
result = response.json()
if not response.ok:
raise SystemExit(f"{result['Code']}: {result['Message']}")
os.makedirs("converted", exist_ok=True)
for file in result["Files"]:
path = os.path.join("converted", file["FileName"])
with open(path, "wb") as out:
out.write(base64.b64decode(file["FileData"]))
print(path, file["FileSize"], "bytes")
import { mkdir, readFile, writeFile } from "node:fs/promises";
import { join } from "node:path";
const form = new FormData();
const file = "loan-payment-formula.odf";
form.append("File", new Blob([await readFile(file)]), file);
form.append("ColorSpace", "gray");
form.append("ImageResolution", "60");
const url = "https://api.pdfconversionapi.com/v2/convert/odf/to/tiff";
const key = process.env.PDFCONVERSIONAPI_KEY;
const response = await fetch(url, {
method: "POST",
headers: { Authorization: `Bearer ${key}` },
body: form,
});
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.Code}: ${result.Message}`);
}
await mkdir("converted", { recursive: true });
for (const file of result.Files) {
const path = join("converted", file.FileName);
await writeFile(path, Buffer.from(file.FileData, "base64"));
console.log(path, file.FileSize, "bytes");
}
{
"ConversionCost": 1,
"ConversionTime": 0.543,
"Files": [
{
"FileName": "loan-payment-formula-1.tiff",
"FileExt": "tiff",
"FileSize": 347894,
"FileData": "SUkqAEhOBQA8AAAAAQAAADwA…"
}
]
}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.

- Input
- loan-payment-formula.odf (1.8 KB)
- Output
- loan-payment-formula-1.tiff (340 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.
| Parameter | What it does |
|---|---|
ColorSpaceenum, default default | gray stores one byte per pixel: the sample's 347,894 bytes against 1,043,314 in color at the same 60 DPI. monochrome keeps that layout with only 0 and 255; rgb gives the same three-channel file as the default.Values: default, rgb, gray, monochrome |
ImageResolutioninteger, default 150 | DPI of the A4 page, written to the resolution tags. Without it the page is 1,240 × 1,753 and, in color, 6,521,426 bytes.Values: 36–600 |
ImageWidthinteger | Width in pixels, height from the A4 shape.Values: 1–20000 |
ImageHeightinteger | Height in pixels.Values: 1–20000 |
ScaleProportionsboolean, default true | false stretches the page to ImageWidth × ImageHeight. |
ScaleImageboolean, default true | false crops instead of scaling. |
ScaleIfLargerboolean, default false | true keeps the page from being enlarged. |
TransparentColorstring | One exact color to clear. It needs an alpha channel, so with gray the file goes back to four channels: 1,391,014 bytes, 326,832 of 347,696 pixels clear.Values: color name, #RRGGBB or R,G,B |
BackgroundColorstring, default white | Page color behind the formula; formula pages have no fill of their own, so it shows. |
FileNamestring | Stem of the name, followed by -1.tiff. |
StoreFileboolean, default false | Return a 3-hour link instead of the file. |
Not supported yet
Setting one of these to anything but its default returns 400.
| Option | What to do instead |
|---|---|
PageSize | 400 "PageSize is not supported yet for ODF files". |
What carries over, and what doesn't
Kept
- The full A4 print page: title row, formula and source text
- The DPI in the resolution tags, 60 per inch in the sample
- Exact pixels, uncompressed
Lost or not yet supported
- Compression: three bytes a pixel in color, four with
TransparentColor, one in gray, nothing smaller. - 1-bit storage:
monochromegives black and white values but still uses a byte per pixel (347,894 bytes, the same as gray). - The gray layout, when
TransparentColoris also sent. - Your file name in the title row, which reads "input".
Limits
- One TIFF per formula file;
MultiPageandTiffTypeare ignored on this route. - 100,000,000 pixels and 16,000 pixels per side; larger sizes return 413.
- There is no support for protected formula files yet: they return 422 "the input file is password-protected" without
Passwordand 400 "password-protected ODF files are not supported yet" with it. An unprotected file sent withPasswordgives the same 6,521,426-byte TIFF at the default 150 DPI. - 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
Formula pages in a TIFF archive
Archives that file scanned pages as gray TIFF can store a formula's page the same way, at a matching DPI.
Raster pages for print checks
A prepress step that wants page images at a known resolution can get the formula page at 300 DPI with that value in its tags.
Questions
How large is a formula page as TIFF?
Width × height × bytes per pixel. In color at the default 150 DPI the A4 page is 6,521,426 bytes; gray at 60 DPI, as in the sample, it is 347,894.
Can I get a 1-bit black-and-white TIFF?
Not yet. ColorSpace=monochrome leaves only black and white pixels, but they are stored as 8-bit gray.
Why did my gray TIFF come back in color with `TransparentColor`?
Transparency needs an alpha channel, so the image is written with four channels again. Leave out TransparentColor to keep the one-channel file.
Convert your first ODF file in a minute.