PDF.co
API actions for the PDF.co integration.
PDF.co
Automate PDF conversions, barcode reading, and document editing with PDF.co.
Add text watermark
Overlay text onto a PDF at specific coordinates.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source_url | string | Yes | Public URL of the PDF to watermark. |
text | string | Yes | Watermark text to place in the PDF. |
x | number | No | X position (in points) for the watermark text. |
y | number | No | Y position (in points) for the watermark text. |
Response
{
"status": "mock_value",
"url": "mock_value"
}Convert PDF to CSV
Turn tables in a PDF into CSV output with an optional delimiter.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source_url | string | Yes | Public URL of the PDF to convert. |
pages | string | No | Optional page ranges to convert (e.g., 1-3). |
Response
{
"csv_url": "mock_value",
"job_id": "mock_value",
"status": "mock_value"
}Convert PDF to text
Extract plain text from a PDF using PDF.co's conversion API.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source_url | string | Yes | Public URL of the PDF to convert. |
pages | string | No | Optional page ranges to convert (e.g., 1-3,5). |
Response
{
"status": "mock_value",
"text": "mock_value"
}Fill PDF form
Populate PDF form fields and return a filled document URL.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source_url | string | Yes | Public URL of the PDF form to fill. |
fields | object | Yes | Key-value pairs of form field names and values. |
Response
{
"fields": "mock_value",
"status": "mock_value",
"url": "mock_value"
}Render HTML to PDF
Render HTML content into a PDF file with an optional output name.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
html | string | Yes | HTML markup to render. |
name | string | No | Optional output filename for the generated PDF. |
Response
{
"name": "mock_value",
"status": "mock_value",
"url": "mock_value"
}Merge PDFs
Merge multiple PDF URLs into a single document.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_urls | array | Yes | List of PDF URLs to merge (at least two). |
output_name | string | No | Optional name for the merged file. |
Response
{
"file_count": 1,
"status": "mock_value",
"url": "mock_value"
}Read barcodes
Extract barcodes from a PDF or image using PDF.co's reader.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source_url | string | Yes | Public URL of the file containing barcodes. |
barcode_types | array | No | Optional list of barcode types to decode (e.g., Code39, QRCode). |
Response
{
"barcodes": [
{}
],
"status": "mock_value"
}Split PDF by ranges
Split a PDF into multiple files using page ranges.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source_url | string | Yes | Public URL of the PDF to split. |
page_ranges | string | Yes | Page ranges to split on (e.g., 1-2,3,4-5). |
Response
{
"status": "mock_value",
"urls": [
{}
]
}