Developer Resources

PDF Tools API Reference

Integrate professional PDF manipulation directly into your applications. RESTful endpoints for merging, splitting, watermarking, protecting, and more.

Open Swagger UI

Getting Started

All endpoints accept files as multipart/form-data and return the processed PDF as application/pdf.

Base URL: https://pdf.lyrafox.com

Example request using cURL:

curl -X POST "https://pdf.lyrafox.com/api/PdfApi/watermark?text=CONFIDENTIAL&opacity=0.3" \
  -F "[email protected]" \
  -o watermarked.pdf

API Reference

POST /api/PdfApi/merge Try it

Merge multiple PDF files into a single document.

Body
files (multipart/form-data)
one or more PDF files.
Response
application/pdf — The processed file stream.
POST /api/PdfApi/split Try it

Split a PDF into the specified pages.

Body
file (multipart/form-data)
the PDF to split.
Query
pages — comma-separated page numbers (e.g. 1,2,5).
Response
application/pdf — The processed file stream.
POST /api/PdfApi/extract Try it

Extract specific pages into a new PDF.

Body
file (multipart/form-data)
the source PDF.
Query
pages — comma-separated page numbers (e.g. 1,3,4).
Response
application/pdf — The processed file stream.
POST /api/PdfApi/rotate Try it

Rotate all pages by a given angle.

Body
file (multipart/form-data)
the PDF to rotate.
Query
angle — rotation in degrees (default 90).
Response
application/pdf — The processed file stream.
POST /api/PdfApi/pagenumber Try it

Add page numbers to each page.

Body
file (multipart/form-data)
the PDF to number.
Query
format — e.g. "Page {n} of {total}"
position — e.g. bottom-center.
Response
application/pdf — The processed file stream.
POST /api/PdfApi/bates Try it

Apply Bates numbering (legal stamping) to each page.

Body
file (multipart/form-data)
the PDF to stamp.
Query
prefix (default BATES-)
start (default 1)
digits (default 6).
Response
application/pdf — The processed file stream.
POST /api/PdfApi/watermark Try it

Add a text watermark to every page.

Body
file (multipart/form-data)
the PDF to watermark.
Query
text — watermark text
opacity — 0.0–1.0 (default 0.3).
Response
application/pdf — The processed file stream.
POST /api/PdfApi/stamp Try it

Stamp text onto each page at a given position.

Body
file (multipart/form-data)
the PDF to stamp.
Query
text — stamp text
position — e.g. center (default).
Response
application/pdf — The processed file stream.
POST /api/PdfApi/protect Try it

Encrypt a PDF with user and owner passwords.

Body
file (multipart/form-data)
the PDF to protect.
Query
userPassword
ownerPassword.
Response
application/pdf — The processed file stream.
POST /api/PdfApi/unlock Try it

Remove password protection from a PDF.

Body
file (multipart/form-data)
the protected PDF.
Query
ownerPassword — the owner password.
Response
application/pdf — The processed file stream.
POST /api/PdfApi/compress Try it

Reduce the file size of a PDF.

Body
file (multipart/form-data)
the PDF to compress.
Response
application/pdf — The processed file stream.
POST /api/PdfApi/metadata Try it

Edit document metadata (Title, Author, Subject, Keywords).

Body
file (multipart/form-data)
the PDF to update.
Query
title, author, subject, keywords — string values.
Response
application/pdf — The processed file stream.