Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Print files on Mac or Linux using the `lp` command with sensible defaults (double-sided, black & white). Supports PDF, markdown (via md-to-pdf conversion), and common print options like copies, page ranges, color, and printer selection.
7installs
Sourcesteveclarke/dotfiles
Added on
NPX Install
npx skill4agent add steveclarke/dotfiles printTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Print files on Mac or Linux using the command with sensible defaults.
lpPrinting Markdown
To print a markdown file, first convert it to PDF using the skill:
/md-to-pdfbash
~/.claude/skills/md-to-pdf/scripts/md-to-pdf.mjs doc.md
~/.claude/skills/print/scripts/print doc.pdf
rm doc.pdf # Delete if PDF was just for printingThe skill handles Mermaid diagrams, syntax highlighting, and page numbers.
/md-to-pdfDefaults
| Setting | Default | Rationale |
|---|---|---|
| Duplex | Double-sided (long-edge) | Save paper |
| Color | Black & white | Save toner on color printers |
These defaults can be overridden per-request.
Usage
Quick Print (uses system default printer)
bash
# Print a file with defaults (double-sided, b&w)
lp -o sides=two-sided-long-edge -o ColorModel=Gray <file>
# Or use the helper script
~/.claude/skills/print/scripts/print <file>Common Options
| Option | Flag | Example |
|---|---|---|
| Printer | | |
| Copies | | |
| Pages | | |
| Single-sided | | Override duplex |
| Color | | Override b&w |
| Landscape | | Rotate 90° |
| Fit to page | | Scale to fit |
List Available Printers
bash
lpstat -p -dShows all printers and the system default (marked with ).
system default destination:Check Print Queue
bash
lpstat -o # Show pending jobs
lpstat -W completed # Show completed jobsCancel a Job
bash
cancel <job-id> # e.g., cancel HP_LaserJet_4001-852
cancel -a # Cancel all jobsHelper Script
The script at wraps with the defaults:
print~/.claude/skills/print/scripts/printlpbash
# Basic usage
print document.pdf
# Specify printer
print document.pdf -d Brother_HL_L3280CDW_series
# Multiple copies
print document.pdf -n 3
# Single-sided color
print document.pdf --single-sided --color
# Page range
print document.pdf -P 1-5Run for all options.
print --helpPrinter-Specific Notes
HP LaserJet 4001
- Supports duplex
- Monochrome only (no color option needed)
- Steve's default printer
Brother HL-L3280CDW
- Color laser
- Supports duplex
- Use to override b&w default
--color
Brother DCP-L2550DW
- Monochrome
- Supports duplex
Troubleshooting
"No such file or directory"
The printer name has changed. Run to see current names.
lpstat -pJob stuck in queue
bash
lpstat -o # Check status
cancel <job-id> # Cancel stuck job
cupsenable <printer-name> # Re-enable if disabledDuplex not working
Not all printers support duplex. Check printer capabilities:
bash
lpoptions -p <printer-name> -l | grep -i sides