PDF Extraction
The FileVerbs PDF API allows you to extract various types of content from PDF documents including attachments, bookmarks, and specific regions of text. Below are the available extraction actions with usage examples.
Available PDF Extraction Actions
Extract Attachments from PDF
Extract embedded file attachments (such as documents, images, or other files) from a PDF document.
Request Example (JSON):
{
"action": "PdfExtractAttachments",
"parameters": {
"fileIds": ["66b357061b7f9c2032d6d70f"]
}
}
Extract Bookmarks from PDF
Extract bookmark titles and their corresponding page destinations from the PDF’s outline tree.
Request Example (JSON):
{
"action": "PdfExtractBookmarks",
"parameters": {
"fileIds": ["66b357061b7f9c2032d6d70f"]
}
}
Extract Tables from PDF
Extract tables from PDF documents and export them as CSV or JSON. The following options are supported:
- outputFormat (optional, default:
csv
): Export format. Supported values:csv
,json
. - splitTables (optional, default:
false
): If true, each table will be split into a separate file. - includeHeaders (optional, default:
true
): Include header rows in the output. - tablePrefix (optional, default:
table
): Prefix used when naming exported tables.
Request Example (JSON):
{
"action": "PdfExtractTables",
"parameters": {
"fileIds": ["66b357061b7f9c2032d6d70f"],
"options": {
"tableExtractionSettings": {
"outputFormat": "csv",
"splitTables": true,
"includeHeaders": true,
"tablePrefix": "summary"
}
}
}
}
Extract Text by Region
Extract text from a specific rectangular area on a PDF page by defining coordinates (X, Y, Width, Height).
- x: X-coordinate of the top-left corner.
- y: Y-coordinate of the top-left corner.
- width: Width of the region.
- height: Height of the region.
- page (optional): Page number to extract from. Defaults to all pages if not provided.
Request Example (JSON):
{
"action": "PdfTextByArea",
"parameters": {
"fileIds": ["66b357061b7f9c2032d6d70f"],
"options": {
"textByAreaSettings": {
"x": 50,
"y": 100,
"width": 200,
"height": 50
}
}
}
}