PSB to PDF API
Post a .psb to /v2/convert/psb/to/pdf to receive a single-page PDF as base64 JSON. The sample asks for PageSize=a4 and PageOrientation=landscape, so the 384 × 128 banner sits centered, at 288 × 96 pt, on an 841.89 × 595.28 pt sheet.
- Endpoint
- POST /v2/
convert/ psb/ to/ pdf - Accepts
- psb
- Sample timing
- 90 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/psb/to/pdf \
-H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
-F File=@ridge-loop-trail-banner.psb \
--form-string PageSize=a4 \
--form-string PageOrientation=landscape \
-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/psb/to/pdf",
headers={"Authorization": f"Bearer {key}"},
files=[("File", open("ridge-loop-trail-banner.psb", "rb"))],
data={
"PageSize": "a4",
"PageOrientation": "landscape",
},
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 = "ridge-loop-trail-banner.psb";
form.append("File", new Blob([await readFile(file)]), file);
form.append("PageSize", "a4");
form.append("PageOrientation", "landscape");
const url = "https://api.pdfconversionapi.com/v2/convert/psb/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.09,
"Files": [
{
"FileName": "ridge-loop-trail-banner.pdf",
"FileExt": "pdf",
"FileSize": 22740,
"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
- ridge-loop-trail-banner.psb (171 KB)
- Output
- ridge-loop-trail-banner.pdf (22 KB)
- Source
- A layered trail-map banner we drew for this site: 384 x 128 pixels at 16 bits per channel on an opaque Background layer, with seven layers including a smooth sky gradient and a hidden old route. Written in the large document (PSB) format by our own script from the published file format specification. (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 | Sheet size. Left at default (or auto), the page matches the image: 288 × 96 pt for the banner. A named size centers the image and leaves it at its own size.Values: default, auto, a3, a4, a5, letter, legal |
PageOrientationenum, default default | Applies to a named PageSize only. The sample's landscape swaps A4 to 841.89 × 595.28 pt.Values: default, portrait, landscape |
MarginHorizontalinteger, default 0 | Left and right margin in millimeters. With an image-sized page the page widens to make room; on a sheet, the image must still fit inside the margins or the request gets 400.Values: 0–500 (mm) |
MarginVerticalinteger, default 0 | Top and bottom margin. On legal with 25 mm the banner was still drawn at 288 × 96 pt in the middle of the 612 × 1008 pt sheet, with its lower-left corner at 162, 456.Values: 0–500 (mm) |
Rotateinteger | Clockwise turn. -90 stood the banner on its end: a 96 × 288 pt page.Values: -360–360 (degrees) |
FileNamestring | Base name of the PDF, ridge-loop-trail-banner.pdf if not set. |
StoreFileboolean, default false | true returns a 3-hour link instead of base64 data. |
What carries over, and what doesn't
Kept
- 16 bits per component: the image in the PDF decodes to exactly the 16-bit PNG the API makes from the same PSB
- Every visible layer, composited by the API; the hidden Old route layer is not drawn
- The image's own size in points at 96 pixels per inch, centered on whichever sheet you choose
- An opaque document stays opaque: no soft mask is added
Lost or not yet supported
- The 150 ppi setting. At 150 ppi the banner would be 184 pt wide; the page uses 96 pixels per inch and makes it 288 pt.
- Layers. The page holds a single image with no PDF layers, and the label is pixels, not text you can select.
- Enlargement to fill the sheet. On the A4 sample the banner covers 288 × 96 pt of an 841.89 × 595.28 pt page; only images larger than the sheet are scaled, and then down.
Limits
- One PSB per request, one page per PDF.
- Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
- The flattened document must stay under 100,000,000 pixels; a 10,001 × 10,000 test PSB got 413.
- Margins up to 500 mm per side;
Rotatebetween -360 and 360. - 120 seconds per conversion, then 504.
- Our PSB tests use pixel layers, masks, groups and blend modes; type layers, smart objects and layer effects are not tested yet.
Where teams use it
Proofing large-format work on a normal sheet
A wall graphic or banner is hard to review at full size. Place a copy on A4 or Letter and send that for comments: a document wider than the sheet is shrunk to fit (a 40,000 px test PSB was drawn 595.28 pt wide on A4), while a small one keeps its size.
Keeping 16-bit gradients in a PDF
A 16-bit document keeps 16 bits per component in the PDF, as the sample does, so gradient values are not rounded to 8 bits on the way into the file that a later step renders or prints.
Questions
Does Pdfa=true give me a PDF/A file?
No. This route has no PDF/A output, and because ConvertAPI documents no options for PSB to PDF, Pdfa=true is ignored rather than refused: we got the same plain PDF 1.7, byte for byte. Run the result through the PDF/A tool if you need archival PDF.
Why is the banner small on my A4 page?
The image is placed at 96 pixels per inch and never enlarged. 384 pixels become 288 pt, about a third of A4's landscape width. Leave PageSize unset to get a page exactly the size of the image.
Is 16-bit color kept?
Yes. The sample's image object has 16 bits per component, and its values equal the 16-bit PNG output for the same file. Grayscale or monochrome output is not available on this route; ColorSpace is ignored here.
Convert your first PSB file in a minute.