Skip to content
pdfconversionapi

WPD to WebP API

POST /v2/convert/wpd/to/webp turns each page of a .wpd file into a lossless WebP. The sample's Letter pages come back at 1,275 × 1,650 pixels as 77,766 and 52,362 bytes; the identical pixels take 262,729 and 186,058 bytes from the PNG route.

Endpoint
POST /v2/convert/wpd/to/webp
Accepts
wpd
Sample timing
0.554 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/wpd/to/webp \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@hearing-notice.wpd \
  -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.554 s median2 files, 127 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.554,
  "Files": [
    {
      "FileName": "hearing-notice-1.webp",
      "FileExt": "webp",
      "FileSize": 77766,
      "FileData": "UklGRr4vAQBXRUJQVlA4TLEv…"
    },
    {
      "FileName": "hearing-notice-2.webp",
      "FileExt": "webp",
      "FileSize": 52362,
      "FileData": "UklGRoLMAABXRUJQVlA4THXM…"
    }
  ]
}

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 hearing-notice-1.webp, rendered by the API
Input
hearing-notice.wpd (1.8 KB)
Output
hearing-notice-1.webp (76 KB)hearing-notice-2.webp (51 KB)
Source
A two-page WordPerfect 5.1 public hearing notice for a fictional township, which we wrote byte by byte from the file format description (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 150Drawing resolution when no pixel size is sent. At 72 the notice's pages are 612 × 792 and weigh 30,844 and 20,854 bytes. The number itself isn't stored: WebP has no field for it.Values: 36 to 600
ImageWidthintegerWidth of each image, height in proportion: 640 returned 640 × 828 pages of 32,346 and 21,734 bytes.Values: 1 to 20,000
ImageHeightintegerHeight of each image instead, or a box together with ImageWidth.Values: 1 to 20,000
PageRangestringPages to draw, such as 1 for a cover image. A page past the end, like 3 here, returns 400.Values: Page numbers and ranges
TransparentColorstringMakes one exact color transparent. With white, 2,032,283 of page 1's 2,103,750 pixels became clear and the file grew to 89,600 bytes.Values: Color name, #RRGGBB or R,G,B
BackgroundColorstringTints the paper. #eef6ff made page 1 pale blue, and the file grew to 140,748 bytes.Values: Color name, #RRGGBB or R,G,B
FileNamestringStem of the output names, hearing-notice by default.
StoreFileboolean, default falseHold the WebPs for 3 hours and reply with links.

What carries over, and what doesn't

Kept

  • Lossless pixels: the WebP decodes to exactly the image the PNG route returns
  • Transparency when you ask for it: TransparentColor adds an alpha channel, and plain pages are RGB
  • The justified paragraphs, centered title and right-aligned posting date of the WordPerfect file
  • Both pages in order, page 2 smaller at 52,362 bytes because it holds less text

Lost or not yet supported

  • A lossy setting: ImageQuality=50 returned the same 77,766 bytes as no setting, because the encoder writes lossless WebP only.
  • Any DPI value. The format has nowhere to keep it.
  • Grayscale savings: ColorSpace=gray returned identical bytes, since the page is already only gray shades and the WebP is written as RGB either way.
  • Searchable text, which only the PDF route gives you.

Limits

  • Page setup options return 400 "... is not supported yet for WPD files"; the document's Letter size is used.
  • At the top resolution, 600 DPI, a Letter page is 5,100 × 6,600 pixels (255,138 bytes for page 2). Larger pixel sizes return 413 past 16,000 pixels per side or 100 million pixels.
  • At most 2,000 pages and 10 MB on the Free plan or 100 MB on paid plans per request; 120 seconds per conversion, then 504.

Where teams use it

Page previews on a web page

Show what a .wpd attachment says without asking the visitor to download it. Lossless WebP keeps black text on white sharp while costing under a third of the bytes of PNG for the same page.

Thumbnails in a document list

PageRange=1 with ImageWidth=640 gives one 32,346-byte image of the notice's first page, sized for a list or a search result card.

Questions

Why pick WebP over PNG for these pages?

Same pixels, smaller files. Page 1 of the sample is 77,766 bytes as WebP and 262,729 as PNG, and page 2 is 52,362 against 186,058. Choose PNG only where the program that receives the image can't read WebP.

Can I trade quality for smaller files?

Not with ImageQuality: it is ignored on this route, and every page is lossless. Shrink the pages with ImageWidth or a lower ImageResolution instead, or use the JPG route for lossy images.

Does a gray color space make the WebP smaller?

No. A black-on-white WordPerfect page is already gray, and WebP stores three channels either way, so ColorSpace=gray gave a byte-for-byte identical file. It does shrink PNG and JPEG output.

Convert your first WPD file in a minute.