Lodol Docs

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

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to watermark.
textstringYesWatermark text to place in the PDF.
xnumberNoX position (in points) for the watermark text.
ynumberNoY 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

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to convert.
pagesstringNoOptional 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

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to convert.
pagesstringNoOptional 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

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF form to fill.
fieldsobjectYesKey-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

ParameterTypeRequiredDescription
htmlstringYesHTML markup to render.
namestringNoOptional 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

ParameterTypeRequiredDescription
file_urlsarrayYesList of PDF URLs to merge (at least two).
output_namestringNoOptional 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

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the file containing barcodes.
barcode_typesarrayNoOptional 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

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to split.
page_rangesstringYesPage ranges to split on (e.g., 1-2,3,4-5).

Response

{
  "status": "mock_value",
  "urls": [
    {}
  ]
}

On this page