Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PDF Reader Tool

Extracts text from PDF files using poppler-utils (pdftotext and pdfinfo).

Details

IDnexus.tool.pdf
Tool Nameread_pdf
DependenciesNone
Requirespoppler-utils installed on the system

Configuration

KeyTypeDefaultDescription
timeoutduration30sMax time for PDF processing
pdftotext_binstringpdftotextPath to the pdftotext binary
pdfinfo_binstringpdfinfoPath to the pdfinfo binary
save_to_sessionboolfalseSave extracted text to session files
save_file_namestring(auto)Filename for saved text

Tool Parameters

ParameterTypeRequiredDescription
pathstringYesPath to the PDF file
first_pageintNoFirst page to extract (1-based)
last_pageintNoLast page to extract
layoutboolNoPreserve original layout

Events

Subscribes To

EventPriorityPurpose
tool.invoke50Handles PDF read requests

Emits

EventWhen
tool.resultExtracted text
tool.registerRegisters the read_pdf tool at boot

Prerequisites

Install poppler-utils:

# macOS
brew install poppler

# Ubuntu/Debian
sudo apt-get install poppler-utils

# Arch Linux
sudo pacman -S poppler

Example Configuration

nexus.tool.pdf:
  timeout: 60s
  save_to_session: true