Skip to content
pdfconversionapi

RTF to JPG API

POST an .rtf file to /v2/convert/rtf/to/jpg and get one JPEG per page. The sample sends ImageResolution=100 and ImageQuality=70 and gets two 850 × 1,100 pages of 100,496 and 49,925 bytes.

Endpoint
POST /v2/convert/rtf/to/jpg
Accepts
rtf
Sample timing
55 ms 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/rtf/to/jpg \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@repair-estimate.rtf \
  --form-string ImageResolution=100 \
  --form-string ImageQuality=70 \
  -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 OK55 ms median2 files, 147 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.055,
  "Files": [
    {
      "FileName": "repair-estimate-1.jpg",
      "FileExt": "jpg",
      "FileSize": 100496,
      "FileData": "/9j/4AAQSkZJRgABAgEAZABk…"
    },
    {
      "FileName": "repair-estimate-2.jpg",
      "FileExt": "jpg",
      "FileSize": 49925,
      "FileData": "/9j/4AAQSkZJRgABAgEAZABk…"
    }
  ]
}

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 repair-estimate-1.jpg, rendered by the API
Input
repair-estimate.rtf (14 KB)
Output
repair-estimate-1.jpg (98 KB)repair-estimate-2.jpg (49 KB)
Source
A two-page repair estimate letter from a fictional appliance shop, with a logo, a priced table, lists, a link, a footnote and a page-numbered footer. We wrote it for these pages in Rich Text Format. (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 85Compression quality. For the two sample pages at 100 DPI: 75,539 and 41,942 bytes at 40, 100,496 and 49,925 at 70, 129,494 and 59,010 at 85, and 283,317 and 109,507 at 100. ConvertAPI documents 75 as its default.Values: 1–100
ImageResolutioninteger, default 150Resolution the pages are drawn at, stored as dots per inch in the JFIF header when sent (100 in the sample). Without it a page is 1,275 × 1,650.Values: 36–600
PageRangestringOnly these pages: 1, 2-last, last or a list. PageRange=3 on the 2-page letter returns 400 "PageRange asks for page 3, but the document has 2 pages".
ImageWidthintegerWidth in pixels with the height from the page shape; PageRange=1&ImageWidth=300 gave a 300 × 388 JPEG of 22,639 bytes.Values: 1–20000
ImageHeightintegerHeight in pixels; with ImageWidth, the page fits inside both values.Values: 1–20000
ColorSpaceenum, default defaultgray produces single-channel JPEGs; monochrome pure black and white; cmyk returns 400.Values: default, rgb, gray, monochrome
BackgroundColorstringPaints the page background before drawing, so margins and empty cells take this color.Values: white, black, red, green, blue, gray, #RRGGBB or R,G,B
FileNamestringStem of the files: FileName=estimate gives estimate-1.jpg and estimate-2.jpg.
StoreFileboolean, default falseLinks to stored JPEGs (3 hours) instead of inline data.

What carries over, and what doesn't

Kept

  • The page layout of the RTF to PDF route: the logo, the address block, the priced table and the lists on page 1, the terms on page 2
  • Colors of headings, borders, shading, the red warning and the highlight
  • Header and footer lines on both pages
  • The resolution you send, as JFIF dots per inch

Lost or not yet supported

  • Sharp edges at low quality: JPEG compression adds halos around small text, more at 40 than at 70.
  • Any transparency; JPEG has none, and TransparentColor is ignored here.
  • The correct page number on page 2, which shows the stored "page 1 of 2".
  • The footnote. Heading sizes and bold are lost too: the 15 pt bold heading 1 is drawn at 20 pt regular, and the 12 pt bold heading 2 at 16 pt regular.

Limits

  • Up to 2,000 pages per request; 16,000 pixels per side and 100 million pixels per page.
  • RTF files can't be encrypted: Password, which ConvertAPI documents for this route, is accepted and ignored.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together; 120 seconds per conversion.

Where teams use it

Sending a letter as an image

Messaging channels and support tools that show images inline but not RTF attachments can display the JPEG. Quality 70 at 100 DPI keeps the sample's 10 pt table text readable at 100,496 bytes for page 1.

Archiving page snapshots with records

Store a JPEG of each estimate or letter page beside the record it belongs to, so the page can be shown later without the RTF or a converter.

Questions

What does ImageQuality change for a text page?

File size and edge noise. Page 2 of the sample, which is mostly white, goes from 41,942 bytes at 40 to 109,507 at 100; page 1, with the logo and the shaded table, from 75,539 to 283,317. Our default of 85 is above ConvertAPI's 75.

Can I get just the last page?

Yes: PageRange=last or 2-last returns repair-estimate-2.jpg only. Page numbers in file names always match the document.

Why do my headings look different from the RTF?

Bold and font size set directly on a heading paragraph are not applied; the heading's color and font are. The sample's heading 1 asks for 15 pt bold Arial in blue and is drawn 20 pt, regular, in blue Liberation Sans, the Arial-compatible font on our side.

Convert your first RTF file in a minute.