Skip to Content
PDF

PDF

Endpoints for compressing, converting, merging, and splitting PDF documents.


Compress

$0.01per request

POST /pdf/compress

Reduce PDF file size using Ghostscript compression presets. Control quality, DPI, image compression, and metadata.

Parameters

NameTypeDefaultDescription
qualityscreen | ebook | printer | prepressebookCompression quality preset. screen = smallest file, prepress = highest fidelity.
colorImageDpinumber (1–2400)Target DPI for color images.
grayscaleImageDpinumber (1–2400)Target DPI for grayscale images.
monoImageDpinumber (1–2400)Target DPI for monochrome images.
imageCompressionjpeg | jpeg2000 | flateImage compression algorithm.
imageQualitynumber (1–100)Lossy compression quality. Ignored for flate.
stripMetadatatrue | falsefalseRemove document metadata.
compatibilityLevel1.4 | 1.5 | 1.6 | 1.71.4Target PDF version.
fastWebViewtrue | falsefalseLinearize for progressive web loading.
subsetFontstrue | falsetrueSubset 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.pdf

Limits

  • Max file size: 200 MB

Convert

$0.018per request

POST /pdf/convert

Convert Office documents, text files, images, and other formats to PDF. Supports page layout, security, and metadata options.

Parameters

NameTypeDefaultDescription
inputFormatenumOverride format auto-detection. Options: docx, xlsx, pptx, doc, xls, ppt, odt, ods, odp, rtf, html, txt, csv, md, png, jpg, svg, and more.
pageSizea4 | letter | legal | a3 | a5 | tabloida4Paper size.
orientationportrait | landscapeportraitPage orientation.
marginTopnumber (0–200)20Top margin in mm.
marginBottomnumber (0–200)20Bottom margin in mm.
marginLeftnumber (0–200)15Left margin in mm.
marginRightnumber (0–200)15Right margin in mm.
pdfVersion1.4 | 1.5 | 1.6 | 1.7 | 2.01.7Output PDF version.
pdfaCompliancenone | 1b | 2b | 3bnonePDF/A compliance level (best-effort).
imageDpinumber (72–600)300DPI for embedded images.
embedFontstrue | falsetrueEmbed fonts in output.
passwordstringUser password to open the PDF.
ownerPasswordstringOwner password for permission control.
allowPrinttrue | falsetrueAllow printing.
allowCopytrue | falsetrueAllow text/image copying.
titlestringPDF metadata: title.
authorstringPDF 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.pdf

Accepted 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

$0.01per request

POST /pdf/merge

Combine multiple PDF files into a single document. Supports page ranges, bookmark handling, and resource deduplication.

Parameters

NameTypeDefaultDescription
pageRangesstringallPer-file page ranges, comma-separated (e.g. ‘1-3,all,5-10’). A single value applies to all files.
outlinepreserve | discard | createpreserveBookmark handling: preserve from inputs, discard all, or create one per input file.
metadatafrom_first | discard | mergefrom_firstDocument metadata source.
flattenFormstrue | falsefalseFlatten form fields into static content before merging.
deduplicateResourcestrue | falsetrueDeduplicate shared resources (fonts, images) to reduce output size.
blankPageSeparatortrue | falsefalseInsert a blank page between each input file.
linearizetrue | falsefalseLinearize output for fast web view.
compatibilityauto | 1.42.0autoForce 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.pdf

Limits

  • Max 50 files per request
  • Max 200 MB total
  • Max 100 MB per file

Split

$0.01per request

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

NameTypeDefaultDescription
modeextract | splitextractextract = selected pages into one PDF. split = multiple PDFs (ZIP output).
pageRangesstringRequired (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’).
splitIntervalnumberRequired if no pageRanges (split mode only). Split every N pages. Use 1 to split into individual pages.
pageRotationnone | 90 | 180 | 270noneRotate all output pages.
flattenFormstrue | falsefalseFlatten form fields into static content.
linearizetrue | falsefalseLinearize output for fast web view.
filenamePatternstringpart-{n}ZIP entry naming for split mode. {n} = 1-based index.
outlinepreserve | discardpreserveBookmark handling.
passwordstringPassword 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.pdf

Limits

  • Max file size: 200 MB
Last updated on