← Documentation

CLI Reference

All commands available via the docunest binary, installed with the .rpm, .deb, Windows, and macOS (docunest --version).

docunest — zsh

local
# Merge two PDFs — local, offline
❯ docunest pdf merge -i report.pdf annexes.pdf -o final.pdf
✓ 2 files merged → final.pdf (1.24 MB)

Command Structure

docunest <category> <command> [options]

Categories: pdf, img, convert
Help: docunest --help

PDF

Annotate a PDF

Add notes, free text, highlights, underlines, and strikethroughs to your PDFs — all editable afterwards. Directly in DocuNest's unified PDF editor (Annotation menu).

Add a note

docunest pdf annotate -i document.pdf --kind note --page 1 --text "To review" --rect "100,700,24,24" -o result.pdf

Compress a PDF

Reduce the size of your PDF files by recompressing the embedded images, with adjustable quality. Directly in DocuNest's unified PDF editor (Document menu).

Compress with quality 60

docunest pdf compress -i document.pdf --quality 60 -o result.pdf

Crop a PDF

Crop PDF pages by defining a crop box or uniform margins. Directly in DocuNest's unified PDF editor (Pages menu).

Crop by rectangle

docunest pdf crop -i document.pdf --rect "50,50,400,600" -o result.pdf

Crop by margins

docunest pdf crop -i document.pdf --margin-mm 15 -o result.pdf

Delete pages

Delete one or more pages from a PDF to keep only the useful content. Directly in DocuNest's unified PDF editor (Pages menu).

Delete pages 2 and 4

docunest pdf delete -i document.pdf --pages "2,4" -o result.pdf

Edit a PDF

Edit text and images in an existing PDF just like in a word processor: double-click a paragraph, retype, and the content shifts automatically. Directly in DocuNest's unified PDF editor.

Encrypt a PDF

Lock your PDFs with a password and finely manage permissions: printing, copying, modifying. Directly in DocuNest's unified PDF editor.

Encrypt a PDF

docunest pdf encrypt -i document.pdf --user-password "secret" --strength aes256 -o result.pdf

Extract images from a PDF

Recover all the images contained in a PDF file and export them in the format of your choice. Directly from the editor (Document menu, Export embedded images).

Extract images as PNG

docunest pdf extract-images -i document.pdf -o images/ --format png

Extract pages

Extract one or more pages from a PDF to create a new, lighter document. Directly in DocuNest's unified PDF editor (Pages menu).

Extract specific pages

docunest pdf extract -i document.pdf --pages "1,3,5-7" -o extracted.pdf

Find and replace in a PDF

Find text throughout the document and replace it in one click: a specific occurrence or all at once. Directly in DocuNest's unified PDF editor, 100% local.

PDF forms: fill, create, flatten

Fill out any PDF form (text fields, checkboxes, radio buttons, lists), sign signature fields, create your own forms, and flatten inputs. Directly in DocuNest's unified PDF editor.

Merge PDFs

Combine multiple PDF files into a single document, in the order of your choice. You can also merge directly from the editor (File menu), without leaving your document.

Merge two files

docunest pdf merge -i file1.pdf file2.pdf -o result.pdf

Merge an entire folder

docunest pdf merge -i *.pdf -o all.pdf

PDF metadata

Read or edit a PDF's metadata: title, author, subject, keywords, dates, and custom fields. Directly in DocuNest's unified PDF editor (Document menu).

Read metadata

docunest pdf metadata -i document.pdf

Edit metadata

docunest pdf metadata -i document.pdf --title "My doc" --author "Me" -o result.pdf

Number pages

Add custom page numbers to each page of your PDF. Directly in DocuNest's unified PDF editor (Insert menu).

Number pages

docunest pdf number-pages -i document.pdf --format "{n}/{total}" --position bottom-center -o result.pdf

Redact a PDF

Permanently remove sensitive areas from a PDF: text and images located under the area are irreversibly destroyed. Directly in DocuNest's unified PDF editor (Edit menu).

Redact an area

docunest pdf redact -i document.pdf --page 1 --rect "100,700,200,30" -o result.pdf

Reorder pages

Change the page order of a PDF with a simple drag-and-drop, directly in DocuNest's unified PDF editor.

Reorder pages

docunest pdf reorder -i document.pdf --order "3,1,2,4" -o result.pdf

Rotate pages

Rotate one or more pages of a PDF by 90°, 180°, or 270°. Directly in DocuNest's unified PDF editor (Pages menu).

Rotate pages by 90°

docunest pdf rotate -i document.pdf --angle 90 --pages "1,3" -o result.pdf

Sign a PDF

Sign your PDFs: draw your signature with your finger or mouse, or import an image (PNG, JPEG), then drag, resize, and rotate it on the page. Directly in DocuNest's unified PDF editor.

Sign a PDF

docunest pdf sign -i document.pdf --image signature.png --page 1 --x 350 --y 50 --width 160 --height 60 -o result.pdf

Split a PDF

Cut a PDF into several files by page ranges or page by page. Split directly from the editor (Document menu, Export), without leaving your document.

Split by ranges

docunest pdf split -i document.pdf --ranges "1-3,4-6" -o output/

One page per file

docunest pdf split -i document.pdf --per-page -o output/

Insert images

Insert an image (photo, logo, stamp) at a precise position on a page of your PDF. Directly in DocuNest's unified PDF editor (Insert menu).

Insert an image

docunest pdf stamp -i document.pdf --image photo.png --x 72 --y 72 --width 200 --height 120 -o result.pdf

Watermark (text or image)

Add a text watermark or an image layer to the pages of your PDF. Directly in DocuNest's unified PDF editor (Insert menu).

Text watermark

docunest pdf watermark -i document.pdf -t "CONFIDENTIAL" --opacity 0.3 --font-size 48 --angle 35 -o result.pdf

Image watermark

docunest pdf watermark -i document.pdf --image logo.png --opacity 0.5 --x 100 --y 100 --width 200 --height 80 -o result.pdf

Images

Compress an image

Reduce the size of your images by adjusting the compression quality, with no visible change.

Compress an image

docunest img compress -i photo.jpg --quality 70 --format jpeg -o compressed.jpg

Convert an image

Convert your images from one format to another (JPEG, PNG, WebP) with quality control.

Convert to WebP

docunest img convert -i photo.png --format webp --quality 85 -o photo.webp

Crop an image

Crop your images by defining a precise crop area using coordinates.

Crop an image

docunest img crop -i photo.jpg --rect "100,50,800,600" -o cropped.jpg

Conversions

Images to PDF

Assemble multiple images into a single PDF file with automatic layout.

Create a PDF from images

docunest pdf from-images -i photo1.jpg photo2.jpg -o album.pdf --page-size a4

Markdown to PDF

Convert your Markdown files into elegant PDFs with automatic layout.

Convert Markdown to PDF

docunest convert md2pdf -i article.md -o article.pdf --paper a4

PDF to images

Convert each page of a PDF into a high-resolution image (PNG, JPEG, or WebP).

Convert to PNG at 300 DPI

docunest pdf to-images -i document.pdf -o images/ --dpi 300 --format png