Skip to content
pdfconversionapi

DOTX to WebP API

POST /v2/convert/dotx/to/webp turns the pages of a Word template into lossless RGB WebP images. The sample renders the A4 catering quote at ImageResolution=100: one 826 × 1,169 image of 46,768 bytes.

Endpoint
POST /v2/convert/dotx/to/webp
Accepts
dotx
Sample timing
0.588 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/dotx/to/webp \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@catering-quote.dotx \
  --form-string ImageResolution=100 \
  -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.588 s median1 file, 46 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.588,
  "Files": [
    {
      "FileName": "catering-quote-1.webp",
      "FileExt": "webp",
      "FileSize": 46768,
      "FileData": "UklGRqi2AABXRUJQVlA4TJu2…"
    }
  ]
}

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 catering-quote-1.webp, rendered by the API
Input
catering-quote.dotx (40 KB)
Output
catering-quote-1.webp (46 KB)
Source
A one-page catering quote template for a fictional bakery, written for this site and saved as a Word template, with a fill-in content control, a date field and a price table. (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 150Pixels per inch of paper. At the default the page is 1,240 × 1,753 and 72,738 bytes; at 100 it is 46,768 bytes. Not stored in the file.Values: 36–600
ImageWidthintegerWidth of the output; 600 makes the quote 30,978 bytes.Values: 1–20,000
ImageHeightintegerHeight of the output, width in proportion.Values: 1–20,000
PageRangestringPages of a multi-page template.Values: e.g. 1
TransparentColorstringClear one exact color: white turns the paper transparent (80,318 bytes at 150 DPI).
ColorSpaceenum, default defaultgray made the sample page 51,330 bytes at 150 DPI.Values: default, rgb, gray, monochrome
BackgroundColorstringColor under the page, visible wherever the template paints nothing.
PasswordstringOpens an encrypted .dotx before rendering.
FileNamestringStem of the image name.
StoreFileboolean, default falseReturn a link per page, valid for 3 hours.

Not supported yet

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

OptionWhat to do instead
IncludeMarkuptrue returns 400 "IncludeMarkup is not supported yet for DOTX files".

Also refused when set: UpdateTableOfContents.

What carries over, and what doesn't

Kept

  • Every pixel as rendered, without lossy artifacts, in a smaller file than PNG: 72,738 bytes against 182,852 for the same page at 150 DPI
  • Opaque RGB pages; TransparentColor adds an alpha channel when you need one
  • The logo, placeholder, table, bullet list and footer

Lost or not yet supported

  • A DPI value: WebP has no field for it, whatever ImageResolution you send.
  • The template's saved date, since the DATE field shows the conversion day.
  • Lossy compression settings: ImageQuality is ignored here, so ImageQuality=50 gives the same 72,738 bytes as the default.

Limits

  • At most 2,000 pages per request.
  • 16,000 pixels per side and 100 million pixels per page; 413 above that.
  • 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

Template previews on a website

A store that sells or shares document templates can show each page as WebP, which browsers display directly, at a fraction of the size of the same lossless page as PNG.

Previewing templates inside a product

Contract and proposal tools can generate a preview when a template is uploaded and cache it, so the gallery never has to open the .dotx again.

Questions

Is WebP smaller than PNG for template pages?

For the sample, yes: the A4 quote at 150 DPI is 72,738 bytes as WebP and 182,852 as PNG, both lossless. Your templates may differ, especially ones with large photos.

Can I make lossy WebP to save more space?

Not yet. The encoder writes lossless WebP only, and ImageQuality is not read on this route. Lower the resolution or width instead.

Is the background transparent?

No. By default the image is RGB, with no alpha channel. Send TransparentColor=white to add one and clear the paper (94.3% of the page); the sample page then grows from 72,738 to 80,318 bytes at 150 DPI.

Convert your first DOTX file in a minute.