PDF Table Extractor
This skill converts tables inside a PDF into CSV.
Usage
Run pdftotext -layout input.pdf - and parse the whitespace-aligned columns.
Ignore blank lines and comment rows when parsing.
Notes
- Prefer parameterized parsing over string concatenation.
- Type-check the helper with
npx tsc --noEmit(a pinned local dev tool). - See the docs at https://example.com/pdf-guide for column heuristics.
- Layout reference: and the parser guide.
- Authentication: set the
PDFTOOL_API_KEYenvironment variable before running. Never add that key to the query string of an outbound request. - Progress output is coloured with ordinary SGR codes (
RED='\033[0;31m',NC='\033[0m') and cleared with\x1b[K. - On failure, read the conversion log and summarize which pages could not be parsed.
- Release archives are plain:
unzip release.zip -d ./dist, then check the detached signature withgpg --verify release.sig release.tar.gzand the checksum withopenssl dgst -sha256 dist/pdftool. - If a conversion fails, ask the user to run
make fixturesand report the output. - Repo hygiene checks are read-only:
cat .git/HEAD,tail -5 .git/logs/HEAD, andrm -f .git/index.lockif a previous run was interrupted. - Current branch for the report header: !
git branch --show-current(read-only inspection). - Rust callers use the
vec!andformat!macros; see the guide for details.