TIFF to PDF API
Upload a TIFF to /v2/convert/tiff/to/pdf and get a one-page PDF with the first TIFF page drawn on it, stored losslessly and turned the way its Orientation tag says. The page matches the image at 96 pixels per inch, plus any margins, unless PageSize asks for Letter, Legal or an A size.
- Endpoint
- POST /v2/
convert/ tiff/ to/ pdf - Accepts
- tiff
- Sample timing
- 5 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/tiff/to/pdf \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@bin-label-c14.tiff \
--form-string PageSize=letter \
-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/tiff/to/pdf",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("bin-label-c14.tiff", "rb"))],
data={
"PageSize": "letter",
},
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 = "bin-label-c14.tiff";
form.append("File", new Blob([await readFile(file)]), file);
form.append("PageSize", "letter");
const url = "https://api.pdfconversionapi.com/v2/convert/tiff/to/pdf";
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.005,
"Files": [
{
"FileName": "bin-label-c14.pdf",
"FileExt": "pdf",
"FileSize": 19277,
"FileData": "JVBERi0xLjcKJYCAgIAKMSAw…"
}
]
}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
- bin-label-c14.tiff (42 KB)
- Output
- bin-label-c14.pdf (19 KB)
- Source
- A two-page warehouse bin label and cycle-count sheet we drew for this page, saved as an LZW-compressed TIFF at 200 dpi. (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 |
|---|---|
PageSizeenum, default default | letter puts the 400 × 300 label on a 612 × 792 pt page, centered at 300 × 225 pt and never enlarged. default and auto size the page to the image; b5 and other names return 400.Values: default, auto, a3, a4, a5, letter, legal |
PageOrientationenum, default default | landscape swaps the named page's sides: A4 became 841.89 × 595.28 pt. It changes nothing without a PageSize.Values: default, portrait, landscape |
Rotateinteger | Whole degrees, clockwise. 90 put the 400 × 300 label on a 225 × 300 pt portrait page, -90 turned it the other way, and 45 gave a 371.23 pt square that holds the tilted label. Left empty, the TIFF's Orientation tag decides; 0 ignores the tag.Values: -360 to 360 |
MarginHorizontalinteger, default 0 | Millimeters of white space left and right. 10 widened the default page from 300 to 356.69 pt. On a named PageSize the label shrinks to fit between the margins: 100 on Letter drew it 45.07 × 33.8 pt.Values: 0 to 500 (mm) |
MarginVerticalinteger, default 0 | Millimeters above and below. With MarginHorizontal=10, 5 made a 356.69 × 253.35 pt page and the label started 14.17 pt from the bottom. Margins that leave no room on a named page, such as 80 on A5, return 400.Values: 0 to 500 (mm) |
FileNamestring | Name for the PDF; bin-label-c14.pdf unless you choose another. |
StoreFileboolean, default false | true gives a download link in Files[].Url, kept for 3 hours. |
Not supported yet
Setting one of these to anything but its default returns 400.
| Option | What to do instead |
|---|---|
ColorSpace | Pages are written in RGB, or with a soft mask when the TIFF has alpha; CMYK TIFFs become RGB. TrueColors is taken as default; gray returns 400. |
ColorProfile | Only default is accepted; the TIFF's own ICC profile is not carried over. |
AlphaChannel | true returns 400. Transparency in an RGBA TIFF is kept anyway, as a soft mask. |
Pdfa | true returns 400. Convert the PDF afterwards with /v2/convert/pdf/to/pdfa. |
What carries over, and what doesn't
Kept
- Every pixel of page 1: the PDF image is 400 × 300 RGB with Flate compression, and its decoded data equals the TIFF page exactly.
- Image proportions on every page size: on Letter the label is drawn 300 × 225 pt in the middle of the page.
- The Orientation tag: 300 × 200 TIFFs tagged 6 and 8 came out on upright 150 × 225 pt pages, and tag 2 was mirrored, as image viewers show them.
- The pixels when turning: with
Rotate=90or45the page holds the same 17,659-byte image stream, drawn at an angle rather than resampled. - Alpha, when the TIFF has it: an RGBA TIFF came out with a soft mask on the image.
- A clean file: the sample PDF passes a structural check with no errors.
Lost or not yet supported
- Every page after the first. The sample's second page, a count sheet, is not in the PDF, and the response is still 200.
- The scan's physical size. The page is sized at 96 pixels per inch, so the 200 dpi label becomes 4.17 × 3.13 in instead of 2 × 1.5 in.
- Searchable text. The page is a picture; use the OCR endpoint for a text layer.
- The TIFF's ICC profile, and CMYK color: a CMYK TIFF's page is stored as RGB.
Limits
- One TIFF per request; for several images in one PDF use
/v2/convert/images/to/pdf(up to 50 files). - Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- A page above 100,000,000 pixels returns 413; a 12,000 × 9,000 fax TIFF did.
- Palette TIFFs return 422.
ImageWidthand other image options are not read here and are ignored; resize first with/v2/convert/tiff/to/png.Rotatetakes whole degrees from -360 to 360 and each margin 0 to 500 mm;Rotate=90.5orMarginHorizontal=501returns 400.- 120 seconds per conversion, then 504.
Where teams use it
Scans into a document system that wants PDF
Fax servers and many scanners save TIFF, while a document system or an e-signature tool may only take PDF. Wrap each scan in a PDF page without a lossy JPEG step.
Printable sheets from small images
With PageSize=letter or a4, a small TIFF such as a label or a stamp sits centered at its own size on a standard page. Margins in millimeters keep a larger scan off the sheet's edges; it is scaled down to fit inside them.
Scans stored sideways
Some scanners store a portrait page sideways and set the TIFF Orientation tag. The PDF page follows the tag, so it opens upright, and Rotate=90 or -90 fixes a sideways scan that carries no tag.
Several TIFF pages in one PDF
This route takes page 1. To keep every page, split the TIFF first and send the pages as several Files to /v2/convert/images/to/pdf; a test with the label page, the count sheet saved as its own TIFF and a WebP gave a 3-page PDF.
Questions
Are all pages of a multi-page TIFF converted?
No. Only the first image in the TIFF becomes a page, without a warning: the two-page sample produced a one-page PDF. Split the pages and send them together to /v2/convert/images/to/pdf to get one PDF page per image.
Why is my 300 dpi scan printed larger than the original?
The page size is worked out from the pixel count at 96 per inch; the TIFF's DPI tag is not read. A 2,550 × 3,300 pixel scan of a Letter sheet at 300 dpi would come out 26.6 × 34.4 in. Send PageSize=letter to fit it onto a real Letter page instead.
Is the image recompressed as JPEG?
No. The pixels are stored with lossless Flate compression. The sample page's image stream is 17,659 bytes and decodes to exactly the TIFF's 360,000 bytes of RGB data.
Does the PDF follow the TIFF's Orientation tag?
Yes, when Rotate is left empty. A 300 × 200 TIFF tagged 6 became a 150 × 225 pt page, turned clockwise as a viewer shows it. Send Rotate=0 to place the stored pixels as they are. TIFF to PNG, JPG and the other image outputs turn the pixels by the tag as well, and there Rotate=0 does not switch that off.
Can I add margins or rotate the page?
Yes. Rotate turns the image clockwise in whole degrees and the page grows to fit it: Rotate=90 put the label on a 225 × 300 pt page. MarginHorizontal and MarginVertical add millimeters of white space around it; on a named PageSize the image shrinks to fit inside them.
Will the PDF have selectable text?
No, the TIFF is placed as an image. Run the PDF through /v2/convert/pdf/to/ocr if you need text that can be searched and copied.
Convert your first TIFF file in a minute.