New
PDF tools: create, convert, compress and edit
Ten new functions cover the PDF tasks that automations need most: create PDFs from HTML, web pages or Markdown, reduce the file size, convert pages into PNG or JPEG, insert, remove and rotate pages, add a text watermark and read or set the metadata. They complement the existing merge, split and watermark functions.
Key facts
- Create
- HTML or URL to PDF with Chromium (CSS, web fonts, images), Markdown to PDF with own CSS
- Convert
- PDF pages to PNG or JPEG; several pages come as ZIP, up to 50 pages per call
- Optimize
- Compress PDFs with Ghostscript; if the result would be larger, the original is returned
- Edit
- Insert pages from a second PDF, remove pages, rotate by 90, 180 or 270 degrees, text watermark, metadata
- Inspect
- Page count, page sizes and rotation, metadata
- Input
- Upload or URL; results come as file or download link
- Available via
- REST API (https://api.1001fx.com) with your API key – from Make, n8n, scripts and AI agents
What you can do with it
- Generate offers, invoices and reports from HTML templates
- Archive web pages as PDF
- Shrink PDFs before you send them by e-mail
- Create thumbnails or previews of PDF pages
- Stamp drafts with CONFIDENTIAL or DRAFT
How it works
- 1
Pick the function for your task.
- 2
Send the PDF as upload or URL, or send HTML, a URL or Markdown to create one.
- 3
Set the options, for example paper format, compression level or pages.
- 4
Use the PDF or the images in the next step of your workflow.
Functions
Each function has its own page with all parameters, examples and a ready-to-copy curl command.
| Function | Endpoint | Credits |
|---|---|---|
| HTML to PDF – Create PDF from HTML or URL | POST /files/html2pdf | 5 credits per call |
| Markdown to PDF | POST /files/markdown2pdf | 5 credits per call |
| Compress PDF – Reduce PDF File Size | POST /files/compresspdf | 3 credits per call |
| PDF to Image – Convert PDF Pages to PNG or JPEG | POST /files/pdf2image | 3 credits per item |
| Get PDF Info – Page Count and Metadata | POST /files/getpdfinfo | 1 credit per call |
| Insert Pages into PDF | POST /files/insertpdfpages | 3 credits per call |
| Remove Pages from PDF | POST /files/removepdfpages | 3 credits per call |
| Rotate PDF Pages | POST /files/rotatepdfpages | 3 credits per call |
| Add Text Watermark to PDF | POST /files/addtextwatermark2pdf | 3 credits per call |
| Edit PDF Metadata | POST /files/setpdfmetadata | 3 credits per call |
Example
A call of https://api.1001fx.com/files/html2pdf. Replace YOURSECRETAPIKEY with your API key.
curl -X POST 'https://api.1001fx.com/files/html2pdf' \
-H 'X-API-KEY: YOURSECRETAPIKEY' \
-H 'Content-Type: application/json' \
-d '{"html":"<h1 style=\"font-family:sans-serif\">Offer 2026-117</h1><p>Thank you for your request.</p>","format":"A4"}'Frequently asked questions
- Does HTML to PDF support CSS and web fonts?
- Yes. The PDF is rendered with Chromium, like printing in the browser, including CSS, web fonts, images and backgrounds.
- How much smaller does a PDF get?
- It depends on the images in the PDF. The headers x-fx-original-size and x-fx-compressed-size show both sizes; if compression does not help, you get the original back.
About 1001fx
1001fx is a function API for no-code automation and AI agents, operated by efec AG in Germany. One API key gives access to more than 152 functions for files, PDFs, images, data, dates and AI. Learn how 1001fx works.