printers (src/lib.rs)

photocraft · crates/ipp/src/lib.rs · rust · Apache-2.0
files

IPP client library for CUPS, providing printer enumeration, default retrieval, and PDF job submission.

// Source: https://github.com/storytold/photocraft | License: Apache-2.0 | Copyright 2026 ArtCraft Team and the PhotoCraft contributors
// Provided via justclaw.it.com; keep this notice with the code.
//! `photocraft-ipp`: a small IPP client for CUPS, in pure Rust with no dependencies.
//!
//! Talks to the local print server the way `lp` does, but in-process: over the CUPS domain
//! socket (`/run/cups/cups.sock`, or `CUPS_SERVER` when it names a path) or TCP (`localhost:631`,
//! or `CUPS_SERVER` as `host[:port]`). Three operations, from RFC 8010 / 8011 and CUPS's own
//! extensions: list the printers, read the default, and submit a PDF as a job.
//!
//! Never panics: every read is bounded and every malformed reply is an error. Works on any Unix
//! and on Windows for TCP (CUPS rarely run

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key