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

Stamp a line of text across every page of a PDF at a chosen position.

Parameters

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to watermark.
textstringYesWatermark text to place in the PDF.
xnumberNoHorizontal position for the watermark text, in points.
ynumberNoVertical position for the watermark text, in points.

Response

{
  "url": "mock_value"
}

Convert PDF to CSV

Turn the tables in a PDF into a CSV spreadsheet file.

Parameters

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to convert.
pagesstringNoOptional pages to convert. The first page is 0, so 0-2 means the first three pages. Leave blank to convert every page.

Response

{
  "csv_url": "mock_value"
}

Convert PDF to text

Extract the plain text from a PDF using PDF.co.

Parameters

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to convert.
pagesstringNoOptional pages to convert. The first page is 0, so 0-2 means the first three pages. Leave blank to convert every page.

Response

{
  "text": "mock_value"
}

Convert HTML to PDF

Turn HTML content into a PDF file, with an optional file name.

Parameters

ParameterTypeRequiredDescription
htmlstringYesThe HTML content to turn into a PDF.
namestringNoOptional file name for the generated PDF.

Response

{
  "name": "mock_value",
  "url": "mock_value"
}

Merge PDFs

Combine multiple PDF files 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,
  "url": "mock_value"
}

Read barcodes

Scan a PDF or image and read any barcodes it contains.

Parameters

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the file containing barcodes.
barcode_typesarrayNoOptional list of barcode types to look for (e.g., Code39, QRCode).

Response

{
  "barcodes": [
    {}
  ]
}

Split PDF by page ranges

Split a PDF into multiple files using page ranges.

Parameters

ParameterTypeRequiredDescription
source_urlstringYesPublic URL of the PDF to split.
page_rangesstringYesWhere to split the PDF, given as page ranges. The first page is 0, so 0-1,2,3- splits after page 2, after page 3, and keeps the rest.

Response

{
  "urls": [
    "mock_value"
  ]
}

On this page