extract_text_by_expression
Extract matching text from a PDF using a regular expression, with optional page range. Saves results as JSON, text, and CSV.
Instructions
Extract text from a PDF matching a regex via PDF4me ExtractTextByExpression (/api/v2/ExtractTextByExpression). pdf_file_path, expression, page_sequence (e.g. '1-' all pages, '1-3', '1,2,3'); optional output_dir. Saves JSON, a matches text file, and CSV.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pdf_file_path": "<pdf_file_path>",
"expression": "<expression>"
},
"name": "extract_text_by_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | ||
| output_dir | No | ||
| page_sequence | No | 1- | |
| pdf_file_path | Yes | ||
| request_doc_name | No |