Skip to Content
prasasti

Command line

The prasasti binary. Pull text out of a file, count its pages, or print what it knows about it.

prasasti text report.pdf -o report.txt --threads 0

Install it with Cargo:

cargo install prasasti-cli

prasasti text

Prints the text of every page, with pages split by a form feed (\f).

prasasti text report.pdf                  # to stdout
prasasti text report.pdf -o report.txt    # to a file
prasasti text report.pdf | less
FlagWhat it does
-o, --output <file>Write to a file instead of stdout
-t, --threads <n>Read pages on n threads. 0 uses every core. The default is 1.
-p, --password <pw>The password of an encrypted PDF

prasasti count

Prints the number of pages.

$ prasasti count report.pdf
15

prasasti info

Prints the format, the page count, whether the file was encrypted or rebuilt from damage, then its metadata.

$ prasasti info report.pdf
format: pdf
pages: 15
encrypted: false
recovered: false
Title: Quarterly report
Author: Finance team

count and info don't take a password yet, so they only open files with an empty user password.

Exit codes

CodeMeaning
0Done
1The file couldn't be opened or written. The reason is on stderr, after error:.
2The command or its arguments are wrong. Usage is printed on stderr.

On this page