UNPKG

@bader-nasser/pdftools

Version:

PDF tools to manipulate and process PDF files

1,557 lines 43.2 kB
{ "commands": { "compress": { "aliases": [ "c" ], "args": { "input": { "description": "Uncompressed PDF file", "name": "input", "required": true } }, "description": "Restore page stream compression", "examples": [ "<%= config.bin %> <%= command.id %> uncompressed.pdf", "<%= config.bin %> <%= command.id %> uncompressed.pdf -o compressed.pdf" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "compress", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "compress", "index.js" ] }, "compress2": { "aliases": [ "c2" ], "args": { "input": { "description": "Decompressed PDF file", "name": "input", "required": true } }, "description": "Compress streams [mutool]", "examples": [ "<%= config.bin %> <%= command.id %> decompressed.pdf", "<%= config.bin %> <%= command.id %> decompressed.pdf -o compressed.pdf" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "linearize": { "aliases": [ "optimize" ], "char": "l", "charAliases": [ "O" ], "description": "Linearize PDF (optimize for web browsers) (ALIASES: -O, --optimize)", "name": "linearize", "allowNo": false, "type": "boolean" }, "pages": { "char": "p", "description": "Comma/space separated list of page numbers and ranges (1,3-5 12-9 N)", "name": "pages", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "metadata": { "char": "m", "description": "Preserve metadata", "name": "metadata", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "compress2", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "compress2", "index.js" ] }, "convert": { "aliases": [], "args": { "input": { "description": "PDF file to convert", "name": "input", "required": true } }, "description": "Convert PDF to text file", "examples": [ "<%= config.bin %> <%= command.id %> file.pdf", "<%= config.bin %> <%= command.id %> file.pdf -o file-text.txt" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "convert", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "convert", "index.js" ] }, "decompress": { "aliases": [ "d", "uncompress", "u" ], "args": { "input": { "description": "Compressed PDF file", "name": "input", "required": true } }, "description": "Decompress PDF page streams for editing the PDF in a text editor", "examples": [ "<%= config.bin %> <%= command.id %> doc.pdf", "<%= config.bin %> <%= command.id %> doc.pdf -o doc-decompressed.pdf" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "decompress", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "decompress", "index.js" ] }, "decompress2": { "aliases": [ "d2", "uncompress2", "u2" ], "args": { "input": { "description": "Compressed PDF file", "name": "input", "required": true } }, "description": "Decompress streams [mutool]", "examples": [ "<%= config.bin %> <%= command.id %> compressed.pdf", "<%= config.bin %> <%= command.id %> compressed.pdf -o decompressed.pdf" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "pages": { "char": "p", "description": "Comma/space separated list of page numbers and ranges (1,3-5 12-9 N)", "name": "pages", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "metadata": { "char": "m", "description": "Preserve metadata", "name": "metadata", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "decompress2", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "decompress2", "index.js" ] }, "drop-xfa": { "aliases": [ "drop" ], "args": { "input": { "description": "PDF with XFA data", "name": "input", "required": true } }, "description": "Remove the form's XFA data", "examples": [ "<%= config.bin %> <%= command.id %> pdf-with-xfa.pdf", "<%= config.bin %> <%= command.id %> pdf-with-xfa.pdf -o pdf-no-xfa.pdf" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "drop-xfa", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "drop-xfa", "index.js" ] }, "extract": { "aliases": [ "ext", "ex", "e" ], "args": {}, "description": "Extract pages from PDF file", "examples": [ { "description": "Extract page number 5 from input.pdf to extracted.pdf", "command": "<%= config.bin %> <%= command.id %> --input input.pdf -f 5" }, { "description": "Extract page number 5 from input.pdf to output.pdf", "command": "<%= config.bin %> <%= command.id %> -i input.pdf -o output.pdf -l 5" }, { "description": "Extract pages from 1 to 3 from input.pdf to output.pdf", "command": "<%= config.bin %> <%= command.id %> -i input.pdf -o output.pdf -f 1 -l 3" }, { "description": "Extract *even* pages from 9 to 4, compress it and rotate it to the left", "command": "<%= config.bin %> <%= command.id %> -i input.pdf -o output.pdf -f 9 -l 4 -c -r left -q even" }, { "description": "Extract pages from 1 to 3, with the 5th page rotated to the east, and *odd* pages from 7 to 4", "command": "<%= config.bin %> <%= command.id %> -i input.pdf -o output.pdf -p 1-3, 5east 7-4odd" }, { "description": "Extract pages as declared in file.txt", "command": "<%= config.bin %> <%= command.id %> -i input.pdf -o output.pdf --data file.txt" } ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "compress": { "char": "c", "description": "Reduce file size\nYou also may want to try: https://www.ilovepdf.com/compress_pdf", "name": "compress", "allowNo": false, "type": "boolean" }, "input": { "char": "i", "description": "Relative or absolute path to the PDF file to be used.\nUse / in the path. On Windows, \\ can be changed to either / or \\\\.\nSurround the path by \" or ' if it contains spaces.", "name": "input", "required": true, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "output": { "char": "o", "description": "Relative or absolute path to the PDF file to be created.\nUse / in the path. On Windows, \\ can be changed to either / or \\\\.\nSurround the path by \" or ' if it contains spaces.", "name": "output", "default": "extracted.pdf", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "first-page": { "aliases": [ "firstPage" ], "char": "f", "description": "First page (defaults to last-page)", "exclusive": [ "page-ranges", "data" ], "name": "first-page", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "last-page": { "aliases": [ "lastPage" ], "char": "l", "description": "Last page (defaults to first-page)", "exclusive": [ "page-ranges", "data" ], "name": "last-page", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "page-ranges": { "aliases": [ "pageRanges" ], "char": "p", "description": "Comma/Space-seperated list of page ranges (eg. 1-3,5east, 4 7-10even 22-11odd)\nSee: https://github.com/bader-nasser/pdftools/blob/main/test/docs/data.txt", "exclusive": [ "first-page", "last-page", "data" ], "name": "page-ranges", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "data": { "char": "d", "description": "Data file (lines of page ranges)\nSee: https://github.com/bader-nasser/pdftools/blob/main/test/docs/data.txt", "exclusive": [ "first-page", "last-page", "page-ranges" ], "name": "data", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "qualifier": { "char": "q", "name": "qualifier", "relationships": [ { "type": "some", "flags": [ "first-page", "last-page" ] }, { "type": "none", "flags": [ "page-ranges", "data" ] } ], "hasDynamicHelp": false, "multiple": false, "options": [ "even", "odd" ], "type": "option" }, "rotation": { "char": "r", "name": "rotation", "relationships": [ { "type": "some", "flags": [ "first-page", "last-page" ] }, { "type": "none", "flags": [ "page-ranges", "data" ] } ], "hasDynamicHelp": false, "multiple": false, "options": [ "north", "south", "east", "west", "left", "right", "down" ], "type": "option" }, "keep": { "char": "k", "description": "Keep output's name", "name": "keep", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "extract", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "extract", "index.js" ] }, "linearize": { "aliases": [ "l", "optimize", "o" ], "args": { "input": { "description": "Input PDF file", "name": "input", "required": true } }, "description": "Optimize for web browsers [mutool]", "examples": [ "<%= config.bin %> <%= command.id %> input.pdf", "<%= config.bin %> <%= command.id %> input.pdf -o input-linearized.pdf" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "decompress": { "char": "d", "description": "Decompress all streams (except compress-fonts/images)", "exclusive": [ "compress", "compress-fonts", "compress-images" ], "name": "decompress", "allowNo": false, "type": "boolean" }, "compress": { "char": "c", "description": "Compress all streams", "exclusive": [ "decompress" ], "name": "compress", "allowNo": false, "type": "boolean" }, "compress-fonts": { "aliases": [ "cf" ], "char": "F", "description": "Compress embedded fonts (ALIASES: --cf)", "exclusive": [ "decompress" ], "name": "compress-fonts", "allowNo": false, "type": "boolean" }, "compress-images": { "aliases": [ "ci" ], "char": "I", "description": "Compress images (ALIASES: --ci)", "exclusive": [ "decompress" ], "name": "compress-images", "allowNo": false, "type": "boolean" }, "garbage": { "char": "g", "description": "Garbage collect unused objects", "name": "garbage", "allowNo": false, "type": "boolean" }, "garbage-compact": { "aliases": [ "compact", "gc" ], "char": "C", "description": "... and compact cross reference table (ALIASES: --gc, --compact)", "name": "garbage-compact", "allowNo": false, "type": "boolean" }, "garbage-deduplicate": { "aliases": [ "deduplicate", "gd" ], "char": "G", "description": "... and remove duplicate objects (ALIASES: --gd, --deduplicate)", "name": "garbage-deduplicate", "allowNo": false, "type": "boolean" }, "keep": { "char": "k", "description": "Keep output's name", "name": "keep", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "linearize", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "linearize", "index.js" ] }, "merge": { "aliases": [ "m", "join", "j" ], "args": { "input": { "description": "Input files (e.g. cover.pdf part-*.pdf)", "name": "input", "required": true } }, "description": "Merge PDFs", "examples": [ { "description": "Merge all .pdf files", "command": "<%= config.bin %> <%= command.id %> *.pdf" }, { "description": "Merge all .pdf files", "command": "<%= config.bin %> <%= command.id %> *.pdf -o output.pdf" }, { "description": "Merge all .pdf files that start with input- & compress the output", "command": "<%= config.bin %> <%= command.id %> input-*.pdf -o output.pdf -c" }, { "description": "Merge cover.pdf with all .pdf files that start with input-, and notes.pdf", "command": "<%= config.bin %> <%= command.id %> cover.pdf input-*.pdf notes.pdf -o output.pdf" } ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "compress": { "char": "c", "description": "Reduce file size\nYou also may want to try: https://www.ilovepdf.com/compress_pdf", "name": "compress", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "default": "merged.pdf", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "keep": { "char": "k", "description": "Keep output's name", "name": "keep", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "merge", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": false, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "merge", "index.js" ] }, "merge2": { "aliases": [ "m2", "join2", "j2" ], "args": { "input": { "description": "PDF files followed by comma-seperated page numbers or ranges\n(e.g. cover.pdf part-*.pdf file.pdf 2,11,4-6,10-8,13-N otherfile.pdf)", "name": "input", "required": true } }, "description": "Note: Compression & garbage collection flags do NOT seem to work!", "examples": [ { "description": "Merge all .pdf files", "command": "<%= config.bin %> <%= command.id %> *.pdf" }, { "description": "Merge all .pdf files", "command": "<%= config.bin %> <%= command.id %> *.pdf -o output.pdf" }, { "description": "Merge all .pdf files that start with input- & compress the output", "command": "<%= config.bin %> <%= command.id %> input-*.pdf -o output.pdf -c" }, { "description": "Merge cover.pdf with all .pdf files that start with input-, and notes.pdf", "command": "<%= config.bin %> <%= command.id %> cover.pdf input-*.pdf notes.pdf -o output.pdf" }, { "description": "Merge all .pdf files and optimize the output for web browsers", "command": "<%= config.bin %> <%= command.id %> input-*.pdf -o output -l" } ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "compress": { "char": "c", "description": "Compress all streams", "exclusive": [ "decompress" ], "name": "compress", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "default": "merged.pdf", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "decompress": { "char": "d", "description": "Decompress all streams (except compress-fonts/images)", "exclusive": [ "compress", "compress-fonts", "compress-images" ], "name": "decompress", "allowNo": false, "type": "boolean" }, "compress-fonts": { "aliases": [ "cf" ], "char": "F", "description": "Compress embedded fonts (ALIASES: --cf)", "exclusive": [ "decompress" ], "name": "compress-fonts", "allowNo": false, "type": "boolean" }, "compress-images": { "aliases": [ "ci" ], "char": "I", "description": "Compress images (ALIASES: --ci)", "exclusive": [ "decompress" ], "name": "compress-images", "allowNo": false, "type": "boolean" }, "linearize": { "aliases": [ "optimize" ], "char": "l", "charAliases": [ "O" ], "description": "Optimize for web browsers (ALIASES: -O, --optimize)", "name": "linearize", "allowNo": false, "type": "boolean" }, "garbage": { "char": "g", "description": "Garbage collect unused objects", "name": "garbage", "allowNo": false, "type": "boolean" }, "garbage-compact": { "aliases": [ "compact", "gc" ], "char": "C", "description": "... and compact cross reference table (ALIASES: --gc, --compact)", "name": "garbage-compact", "allowNo": false, "type": "boolean" }, "garbage-deduplicate": { "aliases": [ "deduplicate", "gd" ], "char": "G", "description": "... and remove duplicate objects (ALIASES: --gd, --deduplicate)", "name": "garbage-deduplicate", "allowNo": false, "type": "boolean" }, "keep": { "char": "k", "description": "Keep output's name", "name": "keep", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "merge2", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": false, "summary": "Merge PDFs [mutool]", "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "merge2", "index.js" ] }, "process": { "aliases": [ "p" ], "args": { "file": { "description": "Data file to process (JSON5 or YAML or TOML)\nSee: https://github.com/bader-nasser/pdftools/blob/main/test/docs/data.json (or .yaml or .toml)\nUse / in the paths. On Windows, \\ can be changed to either / or \\\\", "name": "file", "required": true } }, "description": "Merge PDFs, extract pages and update metadata using simple file", "examples": [ "<%= config.bin %> <%= command.id %> data.json" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "compress": { "char": "c", "description": "Reduce file size\nYou also may want to try: https://www.ilovepdf.com/compress_pdf", "name": "compress", "allowNo": false, "type": "boolean" }, "keep": { "char": "k", "description": "Keep output's name", "name": "keep", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "process", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "process", "index.js" ] }, "repair": { "aliases": [ "r" ], "args": { "input": { "description": "Broken PDF", "name": "input", "required": true } }, "description": "Repair a PDF's corrupted XREF table and stream lengths, if possible", "examples": [ "<%= config.bin %> <%= command.id %> broken.pdf", "<%= config.bin %> <%= command.id %> broken.pdf -o fixed.pdf" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "repair", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "repair", "index.js" ] }, "rotate": { "aliases": [ "rot" ], "args": { "input": { "description": "PDF files", "name": "input", "required": true } }, "description": "Takes a single input PDF and rotates just the specified pages.\nAll other pages remain unchanged.", "examples": [ "<%= config.bin %> <%= command.id %> input.pdf", "<%= config.bin %> <%= command.id %> input.pdf -o rotated", "<%= config.bin %> <%= command.id %> input.pdf -c" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "compress": { "char": "c", "description": "Reduce file size\nYou also may want to try: https://www.ilovepdf.com/compress_pdf", "name": "compress", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "default": "rotated.pdf", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "pages": { "char": "p", "description": "Space-seperated page ranges (eg. 1 end 2-9odd 10west 15-11evensouth)\nSet --direction to - if you want to customize each page's direction!\nSee: https://www.pdflabs.com/docs/pdftk-man-page/#dest-op-rotate", "name": "pages", "default": [ "1-end" ], "hasDynamicHelp": false, "multiple": true, "type": "option" }, "direction": { "char": "d", "name": "direction", "default": "east", "hasDynamicHelp": false, "multiple": false, "options": [ "north", "south", "east", "west", "left", "right", "down", "-" ], "type": "option" }, "keep": { "char": "k", "description": "Keep output's name", "name": "keep", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "rotate", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "summary": "Rotate specified pages of PDF", "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "rotate", "index.js" ] }, "shuffle": { "aliases": [ "sh", "collate" ], "args": { "input": { "description": "PDF files", "name": "input", "required": true } }, "description": "It takes one page at a time from each PDF to assemble the output PDF", "examples": [ "<%= config.bin %> <%= command.id %> *.pdf", "<%= config.bin %> <%= command.id %> *.pdf -o collated", "<%= config.bin %> <%= command.id %> *.pdf -c" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "compress": { "char": "c", "description": "Reduce file size\nYou also may want to try: https://www.ilovepdf.com/compress_pdf", "name": "compress", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "default": "shuffled.pdf", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "keep": { "char": "k", "description": "Keep output's name", "name": "keep", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "shuffle", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": false, "summary": "Collate pages from input PDFs to create a new PDF", "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "shuffle", "index.js" ] }, "split": { "aliases": [ "s" ], "args": { "input": { "description": "Input PDF file", "name": "input", "required": true } }, "description": "Split each page into many tiles [mutool]", "examples": [ "<%= config.bin %> <%= command.id %> input.pdf", "<%= config.bin %> <%= command.id %> input.pdf -x 2", "<%= config.bin %> <%= command.id %> input.pdf -o splitted.pdf -y 2", "<%= config.bin %> <%= command.id %> input.pdf -x 2 -y 3 -r" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "x": { "char": "x", "description": "Pieces to horizontally divide each page into. (Uses default only if --y is NOT used)", "name": "x", "default": 2, "hasDynamicHelp": false, "multiple": false, "type": "option" }, "y": { "char": "y", "description": "Pieces to vertically divide each page into.", "name": "y", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "r": { "char": "r", "description": "Split horizontally from right to left (default splits from left to right). (v1.23.0+)", "name": "r", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "split", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "split", "index.js" ] }, "update-metadata": { "aliases": [ "up-meta", "meta" ], "args": { "input": { "description": "Input PDF to update", "name": "input", "required": true } }, "description": "Update PDF's metadata", "examples": [ "<%= config.bin %> <%= command.id %> input.pdf -f meta.json", "<%= config.bin %> <%= command.id %> input.pdf -f meta.toml -o updated.pdf", "<%= config.bin %> <%= command.id %> input.pdf -o updated.pdf -f meta.yaml -a \"Bader Nasser\" -t awesome" ], "flags": { "dry-run": { "aliases": [ "dryRun" ], "char": "D", "description": "Pretend to work!", "name": "dry-run", "allowNo": false, "type": "boolean" }, "silent": { "char": "s", "description": "Work silently unless there is an error!", "name": "silent", "allowNo": false, "type": "boolean" }, "file": { "char": "f", "description": "Metadata file (JSON5 or YAML or TOML)\nSee: https://github.com/bader-nasser/pdftools/blob/main/test/docs/meta-only.json (or .yaml or .toml)\n\t\t\t", "name": "file", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "title": { "char": "t", "name": "title", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "author": { "char": "a", "name": "author", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "subject": { "char": "S", "name": "subject", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "keywords": { "char": "k", "name": "keywords", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "producer": { "char": "p", "name": "producer", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "creator": { "char": "c", "name": "creator", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "creation-date": { "aliases": [ "creationDate" ], "char": "d", "name": "creation-date", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "modification-date": { "aliases": [ "modificationDate" ], "char": "m", "name": "modification-date", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "output": { "char": "o", "description": "Output file", "name": "output", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "update-metadata", "pluginAlias": "@bader-nasser/pdftools", "pluginName": "@bader-nasser/pdftools", "pluginType": "core", "strict": true, "enableJsonFlag": false, "isESM": true, "relativePath": [ "dist", "commands", "update-metadata", "index.js" ] } }, "version": "4.1.0" }