Input: sample-manual.pdf
java -jar bin/tika-app-3.1.0.jar --text "sample-manual.pdf" >"sample-manual--apache-tika-java.txt"Output: sample-manual--apache-tika-java.txt
Loading preview…
-J/--jsonRecursive: metadata + content (as JSON) from the file and any embedded/attached files, distinct from the flat --text dump above.
java -jar bin/tika-app-3.1.0.jar -J -t "sample-manual.pdf" >"sample-manual--apache-tika-java--recursive.json"Output: sample-manual--apache-tika-java--recursive.json
Loading preview…
-T/--text-main: boilerpipe "main content" extraction, which strips boilerplate (headers/footers/repeated chrome) — designed for web articles, but worth a comparison point here since it's a genuinely different selection algorithm, not just a formatting change.
java -jar bin/tika-app-3.1.0.jar -T "sample-manual.pdf" >"sample-manual--apache-tika-java--text-main.txt"Output: sample-manual--apache-tika-java--text-main.txt
Loading preview…
--config with sortByPosition=true (see tests/config/tika-sort-by-position.xml): PDFParser's default reading order follows content-stream order, which can interleave multi-column/table-ish layouts. sortByPosition reconstructs order from glyph (x,y) coordinates instead — the fix pointed to by several Tika/PDF tutorials (Baeldung, StackOverflow) for that failure mode. Off by default upstream (slower, can misorder simple single-column docs), so kept as an explicit variant rather than replacing the default above.
java -jar bin/tika-app-3.1.0.jar --config=tests/config/tika-sort-by-position.xml -t "sample-manual.pdf" >"sample-manual--apache-tika-java--sort-by-position.txt"Output: sample-manual--apache-tika-java--sort-by-position.txt
Loading preview…