lph
An intelligent wrapper for lp. Automate complex Epson driver flags, quality settings, and page ranges with simple commands.
Print Intelligently
lph abstracts the complexity of the Linux lp command. It automatically detects your default printer using lpstat and applies optimized driver settings.
Built with Epson printers in mind, it handles complex flags like StpDitherAlgorithm, StpColorCorrection, and ink limits so you don't have to.
Why Use lph?
Photo Mode
Optimized for images. Uses CMYK, EvenTone dithering, and Accurate color correction at 607x600dpi.
Document Mode
Best for text. Uses Adaptive dithering and RGB color model for sharp, readable documents.
Draft Mode
Save ink with 300dpi resolution and Black-only color model. Fast and economical.
Page Ranges
Print exactly what you need. Supports ranges (1-5) or specific pages (1,3,5) via the -p flag.
Paper Sizes
Easy switching between A4 and A5 paper sizes directly from the command line.
Grayscale
Dedicated grayscale modes for documents and photos to save color ink while maintaining contrast.
Installation
Quick Install
Download the script and make it executable:
Requirements
Ensure you have CUPS installed and a printer configured on your system.
Options
| Option | Name | Description |
|---|---|---|
-t | Type | Print mode: doc, photo, bw, gray, draft, grayphoto. |
-p | Pages | Page range (e.g., 1-5) or specific pages (e.g., 1,3,5). |
-s | Size | Paper size: A4 or A5 (Default: A4). |
-h | Help | Displays usage message and exits. |
Workflow Examples
📝 Default Document
Prints a document on A4 using TextGraphics mode. Best for standard text files.
🖼️ High Quality Photo
Uses CMYK color model and EvenTone dithering for professional photo output.
📉 Ink Saving Draft
Reduces resolution to 300dpi and uses black ink only. Fast and economical.
📐 A5 Paper Size
Switch the paper size setting to A5 for smaller prints or booklets.
📄 Page Range Selection
Precise control over what gets printed. Use ranges for sequences and commas for individual pages.
Ready to print? 🚀
Get lph on GitHub