PDFix REST API

Developer Reference

Process PDFs programmatically. Merge, split, rotate, watermark, OCR images and more — via simple HTTP calls.

Quick Start

1

Get API Key

Sign up free and generate a key from your dashboard.

Sign up
2

Send a Request

POST multipart/form-data with your PDF file(s) and key.

See endpoints
3

Download Result

Most endpoints return a PDF binary. Text endpoints return JSON.

See examples

Authentication — include in every request:

Authorization: Bearer pfx_your_key_here
# or
X-Api-Key: pfx_your_key_here

Rate Limits & Pricing

TierMonthly callsMax file sizePrice
Free100 / month10 MBRM 0
ProUnlimited100 MBRM 19 / month

Exceeded quota returns HTTP 403. Upgrade to Pro →

Error Responses

StatusMeaning
401Missing or malformed API key
403Invalid key, revoked, or monthly quota exceeded
400Bad request — missing required field or invalid parameter
500Server error processing the PDF

Error body format:

{ "error": "Description of what went wrong" }

Endpoints

POST/api/v1/pdf/mergeMerge PDF

Combine 2 or more PDF files into one.

Parameters (multipart/form-data)

NameTypeRequiredDescription
files[]File[]YesTwo or more PDF files

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/merge \
  -H "Authorization: Bearer pfx_..." \
  -F "files[]=@a.pdf" \
  -F "files[]=@b.pdf" \
  --output merged.pdf
POST/api/v1/pdf/splitSplit PDF

Extract a page range from a PDF.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
fromnumberNoStart page (1-indexed, default 1)
tonumberNoEnd page (1-indexed, default last)

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/split \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "from=2" -F "to=5" \
  --output pages-2-5.pdf
POST/api/v1/pdf/rotateRotate PDF

Rotate pages by 90, 180, or 270 degrees.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
degrees90|180|270NoRotation angle (default 90)
pagesstringNo1-indexed page list, e.g. 1,3,5 or [1,3,5]. Default: all

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/rotate \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "degrees=90" \
  --output rotated.pdf
POST/api/v1/pdf/delete-pagesDelete Pages

Remove specific pages from a PDF.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
pagesstringYes1-indexed pages to delete, e.g. 2,4 or [2,4]

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/delete-pages \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "pages=2,4" \
  --output output.pdf
POST/api/v1/pdf/extract-pagesExtract Pages

Keep only specific pages from a PDF.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
pagesstringYes1-indexed pages to keep, e.g. 1,3,5

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/extract-pages \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "pages=1,3" \
  --output extracted.pdf
POST/api/v1/pdf/watermarkWatermark PDF

Stamp a diagonal text watermark on every page.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
textstringNoWatermark text (default CONFIDENTIAL)
colorstringNoHex color, e.g. #ff0000 (default #ff0000)
opacitynumberNo0–1 opacity (default 0.15)
sizenumberNoFont size in pt (default 48)

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/watermark \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "text=DRAFT" -F "opacity=0.2" \
  --output watermarked.pdf
POST/api/v1/pdf/add-page-numbersAdd Page Numbers

Stamp page numbers on each page.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
positionstringNobottom-center|bottom-right|bottom-left|top-center
startnumberNoStarting number (default 1)
sizenumberNoFont size in pt (default 10)

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/add-page-numbers \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "position=bottom-center" \
  --output numbered.pdf
POST/api/v1/pdf/pdf-to-textPDF to Text

Extract text content from a PDF. Returns JSON.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF

Returns (JSON)

{ "pages": [{ "page": 1, "text": "..." }], "full_text": "...", "page_count": 5 }

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/pdf-to-text \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf"
POST/api/v1/pdf/ocr-imageOCR Image

Extract text from a JPG/PNG image — ideal for receipts, ICs, scanned documents. Returns JSON.

Parameters (multipart/form-data)

NameTypeRequiredDescription
imageFileYesJPG or PNG image file
langstringNoLanguage: eng|msa|chi_sim|ara (default eng)

Returns (JSON)

{ "text": "...", "confidence": 92, "words": [{ "text": "Hello", "confidence": 98 }], "lang": "eng" }

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/ocr-image \
  -H "Authorization: Bearer pfx_..." \
  -F "image=@receipt.jpg" -F "lang=eng"
POST/api/v1/pdf/image-to-pdfImage to PDF

Convert one or more JPG/PNG images to a PDF.

Parameters (multipart/form-data)

NameTypeRequiredDescription
images[]File[]YesOne or more JPG/PNG images

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/image-to-pdf \
  -H "Authorization: Bearer pfx_..." \
  -F "images[]=@page1.jpg" -F "images[]=@page2.png" \
  --output output.pdf
POST/api/v1/pdf/flattenFlatten PDF

Convert interactive form fields into static, uneditable content.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/flatten \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@form.pdf" --output flattened.pdf
POST/api/v1/pdf/protectProtect PDF

Add a password to a PDF.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
passwordstringYesUser password to open the PDF
owner_passwordstringNoOwner/permissions password (defaults to password)

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/protect \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "password=s3cr3t" \
  --output protected.pdf
POST/api/v1/pdf/cropCrop PDF

Trim margins from PDF pages (in points; 1pt ≈ 0.35mm).

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
topnumberNoPoints to cut from top (default 0)
bottomnumberNoPoints to cut from bottom (default 0)
leftnumberNoPoints to cut from left (default 0)
rightnumberNoPoints to cut from right (default 0)

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/crop \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "top=36" -F "bottom=36" \
  --output cropped.pdf
POST/api/v1/pdf/organizeOrganize Pages

Reorder pages of a PDF.

Parameters (multipart/form-data)

NameTypeRequiredDescription
fileFileYesSource PDF
orderstringYesNew page order as 1-indexed list, e.g. [3,1,2] or 3,1,2

Example (curl)

curl -X POST https://pdfix.my/api/v1/pdf/organize \
  -H "Authorization: Bearer pfx_..." \
  -F "file=@doc.pdf" -F "order=3,1,2" \
  --output reordered.pdf

Ready to start building?

Generate your free API key and make your first request in under a minute.

Sign Up Free →