Windows
Command-line tool
rasternivo-cli uses the same conversion engine as the desktop app, for scripts and batch jobs. It runs on your computer, so nothing is uploaded.
Not available yet. The command-line tool isn't included in the desktop download, because it doesn't use your account yet. To automate conversions today, use the API.
Commands
rasternivo-cli inspect <input.pdf> [password options] [--json]
rasternivo-cli convert <input.pdf> -o <folder> [options]
rasternivo-cli versionExamples
# All pages at 150 DPI into the folder "out" (the folder must exist)
rasternivo-cli convert report.pdf -o out
# Pages 1 to 3 and 5 at 300 DPI, quality 85, plus a ZIP
rasternivo-cli convert report.pdf -o out --pages "1-3, 5" --dpi 300 --quality 85 --zip
# Replace files that already exist
rasternivo-cli convert report.pdf -o out --on-exists overwrite
# Page count and page sizes, as JSON
rasternivo-cli inspect report.pdf --json
# A protected PDF: the password comes from an environment variable
set PDF_PASSWORD=your-password
rasternivo-cli convert secret.pdf -o out --password-env PDF_PASSWORDConvert options
| Option | Meaning | Default |
|---|---|---|
-o, --output <folder> | Output folder, which must exist | Required |
--pages <spec> | all, or for example "1-3, 5, 8-10" or "4-" | all |
--dpi <n> | Resolution, 10 to 600 | 150 |
--quality <n> | JPEG quality, 1 to 100 | 90 |
--subsampling <mode> | auto, 444, 420 or gray | auto |
--background <RRGGBB> | Colour behind transparent areas | FFFFFF |
--name <template> | File name template | {original}_page_{page_number:0001} |
--on-exists <policy> | fail, overwrite or rename | fail |
--no-annotations | Leave out annotations | Included |
--no-forms | Leave out form fields | Included |
--optimize | Optimised Huffman tables: smaller, slower | Off |
--zip | Also package the pages as <original>.zip | Off |
--max-pixels <n> | Limit on pixels per page | 100000000 |
--page-timeout <sec> | Time limit per page | 120 |
--json | Machine-readable result on standard output | Off |
--stats | Include timing and memory statistics | Off |
--quiet | No progress output | Off |
Passwords
Never pass a password as an argument, because other programs on the computer could see it. Use one of these:
| Option | Reads the password from |
|---|---|
--password-stdin | The first line of standard input |
--password-env <NAME> | The environment variable NAME |