Endpoints for compressing, converting, merging, and splitting PDF documents.
Compress
POST /pdf/compress
Reduce PDF file size using Ghostscript compression presets. Control quality, DPI, image compression, and metadata.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
quality | screen | ebook | printer | prepress | ebook | Compression quality preset. screen = smallest file, prepress = highest fidelity. |
colorImageDpi | number (1–2400) | — | Target DPI for color images. |
grayscaleImageDpi | number (1–2400) | — | Target DPI for grayscale images. |
monoImageDpi | number (1–2400) | — | Target DPI for monochrome images. |
imageCompression | jpeg | jpeg2000 | flate | — | Image compression algorithm. |
imageQuality | number (1–100) | — | Lossy compression quality. Ignored for flate. |
stripMetadata | true | false | false | Remove document metadata. |
compatibilityLevel | 1.4 | 1.5 | 1.6 | 1.7 | 1.4 | Target PDF version. |
fastWebView | true | false | false | Linearize for progressive web loading. |
subsetFonts | true | false | true | Subset embedded fonts to used characters only. |
Example
tempo request -X POST https://api.fylor.com/pdf/compress \
-F "file=@report.pdf" \
-F "quality=ebook" \
-F "stripMetadata=true" \
-o compressed.pdfLimits
- Max file size: 200 MB
Convert
POST /pdf/convert
Convert Office documents, text files, images, and other formats to PDF. Supports page layout, security, and metadata options.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputFormat | enum | — | Override format auto-detection. Options: docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, rtf, html, txt, csv, md, png, jpg, svg, and more. |
pageSize | a4 | letter | legal | a3 | a5 | tabloid | a4 | Paper size. |
orientation | portrait | landscape | portrait | Page orientation. |
marginTop | number (0–200) | 20 | Top margin in mm. |
marginBottom | number (0–200) | 20 | Bottom margin in mm. |
marginLeft | number (0–200) | 15 | Left margin in mm. |
marginRight | number (0–200) | 15 | Right margin in mm. |
pdfVersion | 1.4 | 1.5 | 1.6 | 1.7 | 2.0 | 1.7 | Output PDF version. |
pdfaCompliance | none | 1b | 2b | 3b | none | PDF/A compliance level (best-effort). |
imageDpi | number (72–600) | 300 | DPI for embedded images. |
embedFonts | true | false | true | Embed fonts in output. |
password | string | — | User password to open the PDF. |
ownerPassword | string | — | Owner password for permission control. |
allowPrint | true | false | true | Allow printing. |
allowCopy | true | false | true | Allow text/image copying. |
title | string | — | PDF metadata: title. |
author | string | — | PDF metadata: author. |
Example
tempo request -X POST https://api.fylor.com/pdf/convert \
-F "file=@document.docx" \
-F "pageSize=letter" \
-F "orientation=portrait" \
-o output.pdfAccepted file types
docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, rtf, html, txt, csv, md, png, jpg, tiff, bmp, svg, gif, webp
Limits
- Max file size: 50 MB
Merge
POST /pdf/merge
Combine multiple PDF files into a single document. Supports page ranges, bookmark handling, and resource deduplication.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
pageRanges | string | all | Per-file page ranges, comma-separated (e.g. ‘1-3,all,5-10’). A single value applies to all files. |
outline | preserve | discard | create | preserve | Bookmark handling: preserve from inputs, discard all, or create one per input file. |
metadata | from_first | discard | merge | from_first | Document metadata source. |
flattenForms | true | false | false | Flatten form fields into static content before merging. |
deduplicateResources | true | false | true | Deduplicate shared resources (fonts, images) to reduce output size. |
blankPageSeparator | true | false | false | Insert a blank page between each input file. |
linearize | true | false | false | Linearize output for fast web view. |
compatibility | auto | 1.4–2.0 | auto | Force PDF version (auto = highest among inputs). |
Example
tempo request -X POST https://api.fylor.com/pdf/merge \
-F "file_0=@chapter1.pdf" \
-F "file_1=@chapter2.pdf" \
-F "file_2=@chapter3.pdf" \
-F "outline=create" \
-o merged.pdfLimits
- Max 50 files per request
- Max 200 MB total
- Max 100 MB per file
Split
POST /pdf/split
Extract specific pages into one PDF, or split a PDF into multiple files (returned as ZIP).
Required parameters: In extract mode, pageRanges is required. In split mode, either splitInterval or pageRanges is required.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
mode | extract | split | extract | extract = selected pages into one PDF. split = multiple PDFs (ZIP output). |
pageRanges | string | — | Required (extract mode) or optional (split mode). Pages to include. Use + to join ranges (e.g. ‘1-3+5+8-10’). In split mode, | separates output files (e.g. ‘1-3|4-6|7-10’). |
splitInterval | number | — | Required if no pageRanges (split mode only). Split every N pages. Use 1 to split into individual pages. |
pageRotation | none | 90 | 180 | 270 | none | Rotate all output pages. |
flattenForms | true | false | false | Flatten form fields into static content. |
linearize | true | false | false | Linearize output for fast web view. |
filenamePattern | string | part-{n} | ZIP entry naming for split mode. {n} = 1-based index. |
outline | preserve | discard | preserve | Bookmark handling. |
password | string | — | Password to open an encrypted PDF. |
Example
tempo request -X POST https://api.fylor.com/pdf/split \
-F "file=@document.pdf" \
-F "mode=extract" \
-F "pageRanges=1-5+10" \
-o extracted.pdfLimits
- Max file size: 200 MB