Overview of FeoPDF API
The FeoPDF API is a REST-based service used to generate high-fidelity PDFs and images from HTML, URLs, or raw content. It uses JSON for request and response bodies.
Base URL: https://feopdf.com/api
website·Indexed 30 days ago
https://feopdf.com/docsA REST API for generating high-fidelity PDFs and images from HTML, URLs, or raw content. Features include template-based generation, a /pdf endpoint for PDF creation, and a /screenshot endpoint for high-quality image capture, all secured via Bearer Token authentication.
The FeoPDF API is a REST-based service used to generate high-fidelity PDFs and images from HTML, URLs, or raw content. It uses JSON for request and response bodies.
Base URL: https://feopdf.com/api
https://feopdf.com/api.// Example JSON data to provide to the AI generator
{
"customer": "Acme Corp",
"items": [],
"total": 1250.00
}Authorization HTTP header as a Bearer token. API keys can be managed via the FeoPDF Dashboard. To prevent unauthorized access, do not expose secret API keys in client-side code or public repositories like GitHub.Authorization: Bearer feo_live_...https://feopdf.com/api/pdf. The request body should be JSON and can include a url and an options object (e.g., specifying the page format or whether to printBackground).curl -X POST https://feopdf.com/api/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"format": "A4",
"printBackground": true
}
}' \
--output document.pdf401 Unauthorized HTTP status code with a JSON error body indicating the key is invalid.{
"error": {
"code": "unauthorized",
"message": "Invalid API key provided."
}
}The /screenshot endpoint accepts an options object to control the rendering of the capture:
fullPage (boolean): If true, captures the entire page. Defaults to false.width (integer): Viewport width in pixels. Defaults to 1920.height (integer): Viewport height in pixels. Defaults to 1080./api/v1/pdf endpoint. You must provide a template_id (created in the FeoPDF console) and a data object containing the JSON values to populate the template. Optional configuration can be passed in the options object, such as specifying the page format (e.g., 'A4').curl -X POST https://feopdf.com/api/v1/pdf \
-H "Authorization: Bearer YOUR_API_KEY"\
-H "Content-Type: application/json"\
-d '{
"template_id": "tmpl_invoice_001",
"data": {
"customer_name": "Acme Corp",
"amount": "$1,250.00",
"invoice_date": "2024-01-15"
},
"options": {
"format": "A4"
}
}'The options object in the POST /pdf request body allows you to customize the output format and orientation:
format (string): The paper format. Supported values are A4 (default), Letter, and A3.landscape (boolean): Set to true to print in landscape mode; defaults to false.{
"options": {
"format": "A3",
"landscape": true
}
}https://feopdf.com/api/pdf. The request body should be JSON and can include an options object to specify the page format (e.g., 'A4') and whether to printBackground.curl -X POST https://feopdf.com/api/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"format": "A4",
"printBackground": true
}
}' \
--output document.pdf