Print any file by describing what you want. No more fighting with print dialogs.
text
Print this PDF double-sided, A4, black and white.
Drucke das zweimal nebeneinander auf ein Querformat-Blatt.
Print pages 2-5 of this document, 2 copies.
Rotate all pages 90 degrees and print.
Merge these three PDFs and print the result.
Remove the background from this photo and print it on A4.
Show me a preview before printing.
TaskScriptKey functionPrint PDFscripts/print.py``print_file(path, printer, params)Print Office file (Word/Excel/PPT)scripts/print.pyauto-converts via LibreOffice, then printsPrint image/photoscripts/print.pyPillow + win32print2-up (two pages side by side)scripts/pdf_tools.py``impose_2up(input, output)Merge PDFsscripts/pdf_tools.py``merge_pdfs(inputs, output)Split PDFscripts/pdf_tools.py``split_pdf(input, output_dir, pages_per_file)Rotate pagesscripts/pdf_tools.py``rotate_pages(input, output, degrees, pages)Add watermarkscripts/pdf_tools.py``add_watermark(input, watermark, output)Encrypt / decrypt PDFscripts/pdf_tools.py``encrypt_pdf() / decrypt_pdf()Extract pagesscripts/pdf_tools.py``extract_pages(input, output, page_numbers)Compress PDFscripts/pdf_tools.py``compress_pdf(input, output)Edit Word contentscripts/office_tools.py``replace_text_docx(), format_paragraph_docx()Edit Excel cellsscripts/office_tools.py``write_cell_xlsx(), replace_value_xlsx()Edit PowerPoint slidesscripts/office_tools.py``replace_text_pptx(), add_slide_pptx()Preview before printingscripts/pdf_tools.py``preview_pdf() → copy to preview.pngPhoto editing (exposure, crop, bg remove)Adobe CC MCP connectorsee Adobe routing table in CLAUDE.md
Pass as a dict to print_file():
KeyValuesExamplepaper``A4, A3, Letter, Legal``"A4"``orientation``portrait, landscape``"landscape"``duplex``duplex, duplexshort, simplex``"duplex"``color``color, monochrome``"monochrome"``scale``fit, shrink, noscale``"fit"``pagesSumatraPDF range string"1-3,5"``copiesinteger2
powershell
# Windows — run once per machine
powershell -ExecutionPolicy Bypass -File setup.ps1
This installs SumatraPDF and LibreOffice via winget, runs pip, and guides you through entering your printer name.
Edit config/printers.yaml:
yaml
default:
printer_name: "Your Printer Name" # get via: wmic printer get name
hosts:
YOUR-HOSTNAME:
printer_name: "Your Printer Name"
Always offer a preview for layout-heavy requests (2-up, booklet, rotated):
python
from scripts.pdf_tools import preview_pdf
import shutil
previews = preview_pdf("output.pdf", dpi=150)
shutil.copy(previews[0], "preview.png")
# Tell user: "Preview saved as preview.png — click it in the file explorer."