🖨️ Linux Printing Helper
🖨️

lph

An intelligent wrapper for lp. Automate complex Epson driver flags, quality settings, and page ranges with simple commands.

⚙️
Auto Detect
🖼️
Epson Flags
📄
Page Ranges
📉
Draft Mode
About lph
🖨️

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.

🐧 Linux 🖨️ CUPS 🐚 Bash 🎨 CMYK
Key Features

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.

Getting Started

Installation

Quick Install

Download the script and make it executable:

# Download the script
curl -O https://raw.githubusercontent.com/user/lph/main/lph
# Make executable
chmod +x lph
# Move to path (optional)
sudo mv lph /usr/local/bin/

Requirements

Ensure you have CUPS installed and a printer configured on your system.

sudo apt install cups
Command Reference

Options

OptionNameDescription
-tTypePrint mode: doc, photo, bw, gray, draft, grayphoto.
-pPagesPage range (e.g., 1-5) or specific pages (e.g., 1,3,5).
-sSizePaper size: A4 or A5 (Default: A4).
-hHelpDisplays usage message and exits.
How to Use

Workflow Examples

📝 Default Document

lph document.pdf

Prints a document on A4 using TextGraphics mode. Best for standard text files.

🖼️ High Quality Photo

lph -t photo image.jpg

Uses CMYK color model and EvenTone dithering for professional photo output.

📉 Ink Saving Draft

lph -t draft notes.txt

Reduces resolution to 300dpi and uses black ink only. Fast and economical.

📐 A5 Paper Size

lph -s A5 flyer.pdf

Switch the paper size setting to A5 for smaller prints or booklets.

📄 Page Range Selection

# Print pages 1 to 5
lph -p 1-5 report.pdf
# Print specific pages only
lph -p 1,3,5 form.pdf

Precise control over what gets printed. Use ranges for sequences and commas for individual pages.

Ready to print? 🚀

Get lph on GitHub