A job names one of these tools. The options below are the ones the server accepts; an option it does not know is refused with INVALID_REQUEST. The same facts, as JSON Schema, come from GET /tools.
Compress PDF compress
Makes a PDF smaller: pictures re-encoded, page content rewritten, fonts trimmed.
Our engine by default, which keeps the text and the drawings as they are and rewrites the pictures; Ghostscript as an option, which rewrites the whole file at one of its presets and often wins on files whose bulk is not pictures. The output is checked: when nothing can be saved, the file comes back as it was.
- Takes
- application/pdf
- Gives
- The PDF, under the same name. (application/pdf)
- Largest file
- 2 GB with a live key, 10 MB with a test key
- Time allowed
- 10 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| imageQuality | number 0.3тАУ0.95 | JPEG quality for pictures the engine re-encodes, 0.3 to 0.95. Default 0.75. |
| maxImageDpi | number 20тАУ1200 | Pictures above this resolution are scaled down to it, 20 to 1200 dots per inch. Default 150. |
| grayscale | boolean | True turns colour pictures grey. Default false. |
| keepImages | boolean | True leaves every picture untouched; only the rest of the file is rewritten. Default false. |
| removeMetadata | boolean | True drops the document information and XMP metadata. Default false. |
| targetBytes | integer 1024тАУ10737418240 | A size to aim for, in bytes (1 KB to 10 GB). The engine tries stronger settings until the file is under it, and says in the job when it could not get there. |
| method | "engine" | "ghostscript" | "engine" (default) or "ghostscript". |
| preset | "printer" | "ebook" | "screen" | With Ghostscript: "printer" (pictures at 300 dpi), "ebook" (150 dpi, the default) or "screen" (72 dpi). |
| linearize | boolean | True rewrites the result for fast web view (a linearized PDF): its first page first, so a browser shows it while the rest is still downloading. Default false. |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "compress",
"options": {
"method": "ghostscript",
"preset": "ebook"
},
"files": [
{
"name": "report.pdf",
"size": 4821130,
"contentType": "application/pdf"
}
]
}'Office to PDF office-to-pdf
Word, Excel, PowerPoint, OpenDocument, RTF, CSV or plain text to PDF, by LibreOffice.
Send the file with its real content type (for example application/vnd.openxmlformats-officedocument.wordprocessingml.document for .docx); the list of accepted types is in GET /tools. The layout follows the documentтАЩs own page setup.
- Takes
- application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.oasis.opendocument.text, application/vnd.oasis.opendocument.spreadsheet, application/vnd.oasis.opendocument.presentation, application/rtf, text/csv, text/plain
- Gives
- A PDF named after the document. (application/pdf)
- Largest file
- 200 MB with a live key, 10 MB with a test key
- Time allowed
- 10 minutes, then the job fails with TIMEOUT
Options
None: send "options": {} or leave it out.
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "office-to-pdf",
"files": [
{
"name": "proposal.docx",
"size": 182400,
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
]
}'PDF to Office pdf-to-office
A PDF into an editable Word (.docx) or PowerPoint (.pptx) file.
Text, pictures and layout are rebuilt by LibreOffice; a scanned PDF gives pictures, not text (run it through OCR first). Spreadsheets are not made on the server: the site builds them in the browser.
- Takes
- application/pdf
- Gives
- The .docx or .pptx file. (application/octet-stream)
- Largest file
- 200 MB with a live key, 10 MB with a test key
- Time allowed
- 15 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| formatrequired | "docx" | "pptx" | "docx" or "pptx". Required. |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "pdf-to-office",
"options": {
"format": "docx"
},
"files": [
{
"name": "contract.pdf",
"size": 310212,
"contentType": "application/pdf"
}
]
}'Repair PDF repair
Rebuilds a damaged PDF from what can still be read.
A file that is not a PDF at all is refused with NOT_A_PDF; one too broken to read gives CORRUPT_PDF.
- Takes
- application/pdf, application/octet-stream
- Gives
- The repaired PDF. (application/pdf)
- Largest file
- 2 GB with a live key, 10 MB with a test key
- Time allowed
- 10 minutes, then the job fails with TIMEOUT
Options
None: send "options": {} or leave it out.
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "repair",
"files": [
{
"name": "damaged.pdf",
"size": 90112,
"contentType": "application/pdf"
}
]
}'PDF to PDF/A pdf-to-pdfa
Converts to PDF/A-1b, 2b or 3b for archiving, and checks the result with veraPDF.
A result that does not pass the check fails the job with CONVERSION_FAILED rather than claiming to be PDF/A.
- Takes
- application/pdf
- Gives
- The PDF/A file. (application/pdf)
- Largest file
- 500 MB with a live key, 10 MB with a test key
- Time allowed
- 15 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| level | "1b" | "2b" | "3b" | "1b", "2b" (default) or "3b". |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "pdf-to-pdfa",
"options": {
"level": "2b"
},
"files": [
{
"name": "invoice.pdf",
"size": 120333,
"contentType": "application/pdf"
}
]
}'OCR ocr
Adds a searchable text layer to scanned pages, in 25 languages.
By default only pages without text are read, so a mixed file is never doubled. Languages: eng (English), hin (Hindi), tel (Telugu), tam (Tamil), kan (Kannada), mal (Malayalam), spa (Spanish), por (Portuguese), ind (Indonesian), ben (Bengali), mar (Marathi), guj (Gujarati), pan (Punjabi), ori (Odia), asm (Assamese), urd (Urdu), ara (Arabic), fra (French), deu (German), ita (Italian), rus (Russian), chi_sim (Simplified Chinese), chi_tra (Traditional Chinese), jpn (Japanese), kor (Korean).
- Takes
- application/pdf
- Gives
- The same PDF with text under the pictures. (application/pdf)
- Largest file
- 500 MB with a live key, 10 MB with a test key
- Time allowed
- 60 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| languagesrequired | "eng" | "hin" | "tel" | "tam" | "kan" | "mal" | "spa" | "por" | "ind" | "ben" | "mar" | "guj" | "pan" | "ori" | "asm" | "urd" | "ara" | "fra" | "deu" | "ita" | "rus" | "chi_sim" | "chi_tra" | "jpn" | "kor"[] | One to 4 of the codes above, the most likely first; each one more slows every page. Required. |
| scope | "scanned" | "all" | "scanned" (default: pages without text only) or "all" (every page read again). |
| engine | "tesseract" | "ocrmypdf" | "tesseract" (default) or "ocrmypdf", which straightens and uprights the pages first and suits long scans. |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "ocr",
"options": {
"languages": [
"eng",
"hin"
]
},
"files": [
{
"name": "scan.pdf",
"size": 2488112,
"contentType": "application/pdf"
}
]
}'Web page to PDF web-to-pdf
Prints a public web page to PDF with a headless browser.
The job takes no file: the address is an option. Only public addresses are printed; private and local ones, and anything the page redirects to that is not public, are refused with INVALID_URL. The page is printed with its print stylesheet, with bookmarks from its headings.
- Takes
- no file (an address in the options)
- Gives
- A PDF named after the host. (application/pdf)
- Largest file
- none
- Time allowed
- 3 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| urlrequired | string | The pageтАЩs address, http or https. Required. |
| pageSize | "A4" | "Letter" | "A4" (default) or "Letter". |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "web-to-pdf",
"options": {
"url": "https://example.com/report"
},
"files": []
}'HTML to PDF html-to-pdf
Prints an HTML file, scripts off and nothing fetched from the network.
Styles and pictures must be inside the file (inline or as data: addresses); a reference to another address is left out.
- Takes
- text/html, application/xhtml+xml
- Gives
- The PDF. (application/pdf)
- Largest file
- 20 MB with a live key, 10 MB with a test key
- Time allowed
- 3 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| pageSize | "A4" | "Letter" | "A4" (default) or "Letter". |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "html-to-pdf",
"files": [
{
"name": "statement.html",
"size": 40221,
"contentType": "text/html"
}
]
}'Markdown to PDF markdown-to-pdf
Typesets a Markdown file: headings, lists, tables, code, pictures inside the file.
- Takes
- text/markdown, text/x-markdown, text/plain
- Gives
- The PDF. (application/pdf)
- Largest file
- 10 MB with a live key, 10 MB with a test key
- Time allowed
- 3 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| pageSize | "A4" | "Letter" | "A4" (default) or "Letter". |
| style | "sans" | "serif" | "sans" (default) or "serif". |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "markdown-to-pdf",
"options": {
"style": "serif"
},
"files": [
{
"name": "notes.md",
"size": 8112,
"contentType": "text/markdown"
}
]
}'EPUB to PDF epub-to-pdf
Prints an e-book without DRM, chapter by chapter, with its table of contents.
A protected book is refused with EPUB_PROTECTED.
- Takes
- application/epub+zip
- Gives
- The PDF. (application/pdf)
- Largest file
- 200 MB with a live key, 10 MB with a test key
- Time allowed
- 10 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| pageSize | "A4" | "Letter" | "A5" | "A4", "Letter" or "A5" (default A4). |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "epub-to-pdf",
"options": {
"pageSize": "A5"
},
"files": [
{
"name": "book.epub",
"size": 1210443,
"contentType": "application/epub+zip"
}
]
}'PDF to SVG pdf-to-svg
Each page as an SVG drawing, text as text.
One page comes as a .svg file; several pages come as a ZIP of them.
- Takes
- application/pdf
- Gives
- An .svg file, or a .zip of one per page. (image/svg+xml)
- Largest file
- 200 MB with a live key, 10 MB with a test key
- Time allowed
- 10 minutes, then the job fails with TIMEOUT
Options
None: send "options": {} or leave it out.
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "pdf-to-svg",
"files": [
{
"name": "diagram.pdf",
"size": 55000,
"contentType": "application/pdf"
}
]
}'Check PDF/A and PDF/UA pdfa-check
Checks conformance with veraPDF and returns a JSON report; the file is not changed.
The report says what the file claims, and for each standard checked whether it conforms, the rules it breaks (the most broken first) and a few of the places.
- Takes
- application/pdf
- Gives
- A JSON report (application/json). (application/json)
- Largest file
- 500 MB with a live key, 10 MB with a test key
- Time allowed
- 10 minutes, then the job fails with TIMEOUT
Options
| Name | Type | Description |
|---|---|---|
| flavour | "4" | "auto" | "1a" | "1b" | "2a" | "2b" | "2u" | "3a" | "3b" | "3u" | "4e" | "4f" | "ua1" | "ua2" | "auto" (default: the part the file claims, PDF/A-2b when none), a PDF/A level ("1a", "1b", "2a", "2b", "2u", "3a", "3b", "3u", "4", "4e", "4f") or PDF/UA ("ua1", "ua2"). |
# Once, in your shell: the key never goes into a script.
export UVPDF_KEY="uvp_live_..."
curl -X POST "https://uvpdftool.com/api/v1/jobs" \
-H "Authorization: Bearer $UVPDF_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "pdfa-check",
"options": {
"flavour": "2b"
},
"files": [
{
"name": "archive.pdf",
"size": 220118,
"contentType": "application/pdf"
}
]
}'