Command-line printing for Windows

Print whole folders of documents with one command

Cmd4Printer sends PDFs, Office documents, images, web pages and emails from folders, lists or URLs to any Windows printer — in the order, copies, duplex mode, tray and paper size you specify. No windows to click, no dialogs to dismiss: built for scheduled tasks, batch scripts and system integration.

  • Windows 7 SP1 – 11
  • .NET Framework 4.8
  • Local, network and virtual printers
  • English and Chinese UI
Get started in three steps

Check first, then print

Every command can be pasted straight into Command Prompt or PowerShell. Replace Office A with the name of your printer.

1. Find your printer

List the installed printers; the default one is marked.

Command Prompt
cmd4printer -options showprnlist

2. Dry run — no paper

See which files would print, how many pages and sheets, and which files cannot be opened.

Command Prompt
cmd4printer -src "D:\Inbox\*.*" -prn "Office A" -options dryrun:yes

3. Print for real

Duplex, two copies, sorted by file name.

Command Prompt
cmd4printer -src "D:\Inbox\*.*" -prn "Office A" -props duplex:vertical copies:2 -options sort:name

Browse every parameter →

Built for unattended use

When something goes wrong, your script knows

  • Exit codes separate full success, partly failed batches, a missing printer and unconfirmed submissions
  • output:json returns state, pages, sheets and job ID for every file
  • The failed-files list can be fed straight back in to reprint only what failed
  • Per-file timeouts, files still being written are skipped, a broken file does not stop the batch
  • Office conversion runs in a separate process that is cleaned up on timeout, without touching documents you have open

Logs, statistics and exit codes →

Command
cmd4printer -src "D:\Inbox\*.pdf" -prn "Office A" -options output:json
Output (excerpt)
{
  "tool": "cmd4printer",
  "version": "0.2.0",
  "printer": "Office A",
  "items": [
    { "index": 1, "source": "D:\\Inbox\\contract.pdf", "pages": 3, "sheets": 2,
      "state": "submitted", "jobId": 41 }
  ],
  "counts": { "submitted": 1, "failed": 0, "skipped": 0 },
  "exitCode": 0
}
Supported formats

99 file extensions, one command

PDF, images, text and XPS use built-in engines; Office files are converted by the Microsoft Office installed on the PC; web pages, Markdown, EPUB and email are rendered by Edge or Chrome.

PDFpdf
Common imagesjpg jpeg jpe jfif png bmp dib gif tif tiff emf wmf
More image formatswebp heic heif avif jxr wdp hdp ico
TGAtga
Photoshoppsd psb
Text and source codetxt text log ini bat cmd c cpp h java js php ps1 ps1m py vb vbs ics vcf json xml sql cs
XPSxps oxps
CAD vector drawingsdxf plt hpgl hgl
Printer-language passthroughzpl prn pcl epl
Web pages and URLshtm html xhtml mht mhtml svg
Markdownmd markdown
EPUB e-booksepub
Emaileml emlx msg
Word documentsdoc docx docm dot dotx dotm rtf odt wps
Excel workbooksxls xlsx xlsm xlsb xlt xltx ods csv
PowerPoint presentationsppt pptx pptm pps ppsx pot potx odp
Visio drawingsvsd vsdx vsdm vdx
Publisher filespub

Unsupported files are skipped and reported. Requirements per format →

Free trial

The trial has every feature and no time limit; it just adds one report page at the end of each print run.

Pricing & licensing

Licensed per Windows user account: pay once, free updates within the major version, offline activation for isolated networks.

Support

FAQ, deployment notes and email support answered on business days.

News

About Cmd4Printer

Cmd4Printer focuses on unattended printing on Windows: the same command gives the same result every time, and every file is accounted for. Each feature is checked against real printer drivers and an emulated network printer to confirm that duplex, tray, paper, copies and color arrive exactly as requested.