{"id":19218873,"url":"https://github.com/openprinting/hplip-printer-app","last_synced_at":"2025-10-08T14:14:24.532Z","repository":{"id":44584397,"uuid":"403149014","full_name":"OpenPrinting/hplip-printer-app","owner":"OpenPrinting","description":"HPLIP Printer Application","archived":false,"fork":false,"pushed_at":"2025-08-20T07:28:19.000Z","size":170,"stargazers_count":52,"open_issues_count":12,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-20T09:26:08.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenPrinting.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-04T20:19:55.000Z","updated_at":"2025-08-20T07:28:22.000Z","dependencies_parsed_at":"2024-01-17T18:19:41.947Z","dependency_job_id":"57b26de8-5464-4ad0-a715-e96bb76e7d32","html_url":"https://github.com/OpenPrinting/hplip-printer-app","commit_stats":{"total_commits":88,"total_committers":5,"mean_commits":17.6,"dds":"0.28409090909090906","last_synced_commit":"6b10f32d8640a530bf897ac2d3edc9976392cee8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OpenPrinting/hplip-printer-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Fhplip-printer-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Fhplip-printer-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Fhplip-printer-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Fhplip-printer-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenPrinting","download_url":"https://codeload.github.com/OpenPrinting/hplip-printer-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Fhplip-printer-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278956350,"owners_count":26075229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T14:28:35.191Z","updated_at":"2025-10-08T14:14:24.524Z","avatar_url":"https://github.com/OpenPrinting.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HPLIP Printer Application\n\n## INTRODUCTION\n\nThis repository contains a Printer Application for printing on HP and\nApollo printers supported by HP's HPLIP driver suite.\n\nIt uses [PAPPL](https://www.msweet.org/pappl) to support IPP\nprinting from multiple operating systems. In addition, it uses the\nresources of [cups-filters\n2.x](https://github.com/OpenPrinting/cups-filters) (filter functions\nin libcupsfilters, libppd) and\n[pappl-retrofit](https://github.com/OpenPrinting/pappl-retrofit)\n(encapsulating classic CUPS drivers in Printer Applications). This\nwork (or now the code of pappl-retrofit) is derived from the\n[hp-printer-app](https://github.com/michaelrsweet/hp-printer-app).\n\nThe printer driver itself and the software to communicate with the\nprinter hardware is taken from the [HPLIP (HP Linux Imaging and\nPrinting) driver\nsuite](https://developers.hp.com/hp-linux-imaging-and-printing/), also\nthe Information about supported printer models and their capabilities.\n\nYour contributions are welcome. Please post [issues and pull\nrequests](https://github.com/OpenPrinting/hplip-printer-app).\n\n**Note: HPLIP is actively maintained by HP, they are continuously\nadding the newest printer models and adapting the software to new\nenvironments/Linux distributions. Therefore it would also be the\ncorrect way if HP turns HPLIP into a Printer Application or at least\noffers this as an alternative to the classic CUPS/SANE\ndriver. Especially they should create a native Printer Application,\nmeaning that it does not use PPDs, CUPS filters, and CUPS backends\ninternally. Also their utilities need to be made independent of\nCUPS.**\n\nFor PostScript printers you can also use the [PostScript Printer\nApplication](https://github.com/OpenPrinting/ps-printer-app),\nespecially if you have it already installed for some non-HP PostScript\nprinter.\n\nAlso check whether your printer is a driverless IPP printer (AirPrint,\nMopria, IPP Everywhere, Wi-Fi Direct Print, prints from phones) as in\nthis case you do not need any Printer Application at all. Most modern\nHP printers, even the cheapest models, are driverless IPP\nprinters. Even USB-only printers can be driverless IPP, and you can\ngenerally use driverless IPP via USB, try\n[ipp-usb](https://github.com/OpenPrinting/ipp-usb) for these cases\nfirst.\n\n\n### Properties\n\n- A Printer Application providing the `hpcups` printer driver and all\n  printer's PPDs of HPLIP, supporting printing on most printers from\n  HP and Apollo. This allows easy printing in high quality, including\n  photos on photo paper. The `hpps` CUPS filter for PIN-protected\n  printing on PostScript printers is also included.\n\n- The printers are discovered with HPLIP, too. For USB printers the\n  `hp` CUPS backend is used and for network printers the `hp-probe`\n  utility (encapsulated in a script to behave as a CUPS backend).\n\n- The communication with the printers is done by the `hp` CUPS backend\n  and so (at least in case of USB) the IEEE-1284.4 packet protocol\n  (protocol 7/1/3 on USB) is used and not a simple stream protocol\n  (like the standard CUPS and PAPPL backends use). This way one should\n  be able to print and scan simultaneously, or at least check printer\n  status while printing. Not all printers support this protocol, if\n  not, a standard streaming protocol is used. Also any other special\n  functionality which requires the `hp` backend is supported. On the\n  \"Add Printer\" web interface page under \"Devices\" select the \"HPLIP\n  (HP)\" entries.\n\n- Note that the `hp` backend does not allow bi-directional access to\n  the printer. If you have a PostScript printer and prefer support for\n  remote querying of the printer's accessory configuration instead of\n  simultaneous printing and scanning, CUPS' standard backends for USB\n  and network printers are also available.\n\n- If you have an unusal system configuration or a personal firewall\n  HP's backends will perhaps not discover your printer. Also in this\n  situation the standard backends, including the fully manual \"Network\n  Printer\" entry in combination with the hostname/IP field can be\n  helpful.\n\n- Use of CUPS' instead of PAPPL's standard backends makes quirk\n  workarounds for USB printers with compatibility problems being used\n  (and are editable) and the output can get sent to the printer via\n  IPP, IPPS (encrypted!), and LPD in addition to socket (usually port\n  9100). The SNMP backend can get configured (community, address\n  scope).\n\n- PWG Raster, Apple Raster or image input data to be printed on a\n  non-PostScript printer does not get converted to PostScript or PDF,\n  it is only converted/scaled to the required color space and\n  resolution and then fed into the `hpcups` driver.\n\n- For printing on non-PostScript printers PDF and PostScript input\n  data is rendered into raster data using Ghostscript. Ghostscript is\n  also used to convert PDF into PostScript for PostScript printers.\n\n- The information about which printer models are supported and which\n  are their capabilities is based on the PPD files included in\n  HPLIP. They are packaged in the Snap as a compressed archive.\n\n- Standard job IPP attributes are mapped to the driver's option\n  settings best fitting to them so that users can print from any type\n  of client (like for example a phone or IoT device) which only\n  supports standard IPP attributes and cannot retrive the PPD\n  options. Trays, media sizes, media types, and duplex can get mapped\n  easily, but when it comes to color and quality it gets more complex,\n  as relevant options differ a lot in the PPD files. Here we use an\n  algorithm which automatically (who wants hand-edit ~3000 PPD files\n  for the assignments) finds the right set of option settings for each\n  combination of `print-color-mode` (`color`/`monochrome`),\n  `print-quality` (`draft`/`normal`/`high`), and\n  `print-content-optimize`\n  (`auto`/`photo`/`graphics`/`text`/`text-and-graphics`) in the PPD of\n  the current printer. So you have easy access to the full quality or\n  speed of your printer without needing to deal with printer-specific\n  option settings (the original options are still accessible via web\n  admin interface).\n\n- The Snap of the HPLIP Printer Application takes HPLIP's source code\n  from Debian's packaging repository instead of directly from HP, as\n  Debian's package has ~80 patches fixing bugs which are reported to\n  HP but the patch not adopted upstream. So with the Snap users should\n  get the same experience in reliability and quality as with the\n  Debian package.\n\n- Support for downloading the proprietary plugin of HPLIP via an\n  additional page in the web interface. This adds support for some\n  laser printers which need their firmware loaded every time they are\n  turned on or which use certain proprietary print data formats. This\n  works both in the Snap and in the classic installation of the\n  Printer Application (must run as root, otherwise only status check\n  of the plugin).\n\n### To Do\n\n- Support for scanning on HP's multi-function printers. this requires\n  scanning support in PAPPL (which made [good progress in GSoC\n  2021](https://github.com/michaelrsweet/pappl/commits/scanning)).\n\n- PDF test page, for example generated with the bannertopdf filter.\n\n- Human-readable strings for vendor options (Needs support by PAPPL:\n  [Issue #58: Localization\n  support](https://github.com/michaelrsweet/pappl/issues/58))\n\n- Internationalization/Localization (Needs support by PAPPL: [Issue\n  #58: Localization\n  support](https://github.com/michaelrsweet/pappl/issues/58))\n\n- SNMP Ink level check via ps_status() function (Needs support by PAPPL:\n  [Issue #83: CUPS does IPP and SNMP ink level polls via backends,\n  PAPPL should have functions for\n  this](https://github.com/michaelrsweet/pappl/issues/83))\n\n- Build options for cups-filters, to build without libqpdf and/or\n  without libppd, the former will allow to create the Snap of this\n  Printer Application without downloading and building QPDF\n\n\n## THE SNAP\n\n### Installing and building\n\nTo just run and use this Printer Application, simply install it from\nthe Snap Store:\n\n```\nsudo snap install --edge hplip-printer-app\n```\n\nThen follow the instructions below for setting it up.\n\nTo build the Snap by yourself, in the main directory of this\nrepository run\n\n```\nsnapcraft snap\n```\n\nThis will download all needed packages and build the HPLIP Printer\nApplication. Note that PAPPL (upcoming 1.0) and cups-filters (upcoming\n2.0) are pulled directly from their GIT repositories, as there are no\nappropriate releases yet. This can also lead to the fact that this\nPrinter Application will suddenly not build any more.\n\nTo install the resulting Snap run\n\n```\nsudo snap install --dangerous hplip-printer-app_1.0_amd64.snap\n```\n\n\n### Setting up\n\nThe Printer Application will automatically be started as a server daemon.\n\nEnter the web interface\n\n```\nhttp://localhost:8000/\n```\n\nUse the web interface to add a printer. Supply a name, select the\ndiscovered printer, then select make and model. Also set the installed\naccessories, loaded media and the option defaults. If the printer is a\nPostScript printer, accessory configuration and option defaults can\nalso often get polled from the printer.\n\nIf the entry of your printer in the web interface has the remark\n\"requires proprietary plugin\", you need to install HP's plugin. For\nthis, click on the \"Plugin\" button in this printer entry or on the\n\"Install Proprietary Plugin\" button under \"Other Settings\" on the\nfront page of the web interface and follow the instructions on the\nscreen.\n\nThen print PDF, PostScript, JPEG, Apple Raster, or PWG Raster files\nwith\n\n```\nhplip-printer-app FILE\n```\n\nor print with CUPS, CUPS (and also cups-browsed) discover and treat\nthe printers set up with this Printer Application as driverless IPP\nprinters (IPP Everywhere and AirPrint).\n\nSee\n\n```\nhplip-printer-app --help\n```\n\nfor more options.\n\nUse the \"-o log-level=debug\" argument for verbose logging in your\nterminal window.\n\nYou can add files to `/var/snap/hplip-printer-app/common/usb/` for\nadditional USB quirk rules. Edit the existing files only for quick\ntests, as they get replaced at every update of the Snap (to introduce\nnew rules).\n\nYou can edit the `/var/snap/hplip-printer-app/common/cups/snmp.conf`\nfile for configuring SNMP network printer discovery.\n\n## THE ROCK (OCI CONTAINER IMAGE)\n\n### Install from Docker Hub\n#### Prerequisites\n\n1. **Docker Installed**: Ensure Docker is installed on your system. You can download it from the [official Docker website](https://www.docker.com/get-started).\n\n#### Step-by-Step Guide\n\nYou can pull the `hplip-printer-app` Docker image from either the GitHub Container Registry or Docker Hub.\n\n**From GitHub Container Registry** \u003cbr\u003e\nTo pull the image from the GitHub Container Registry, run the following command:\n```sh\n  sudo docker pull ghcr.io/openprinting/hplip-printer-app:latest\n```\n\nTo run the container after pulling the image from the GitHub Container Registry, use:\n```sh\n  sudo docker run -d \\\n      --name hplip-printer-app \\\n      --network host \\\n      -e PORT=\u003cport\u003e \\\n      ghcr.io/openprinting/hplip-printer-app:latest\n```\n\n**From Docker Hub** \u003cbr\u003e\nAlternatively, you can pull the image from Docker Hub, by running:\n```sh\n  sudo docker pull openprinting/hplip-printer-app\n```\n\nTo run the container after pulling the image from Docker Hub, use:\n```sh\n  sudo docker run -d \\\n      --name hplip-printer-app \\\n      --network host \\\n      -e PORT=\u003cport\u003e \\\n      openprinting/hplip-printer-app:latest\n```\n\n- `PORT` is an optional environment variable used to start the printer-app on a specified port. If not provided, it will start on the default port 8000 or, if port 8000 is busy, on 8001 and so on.\n- **The container must be started in `--network host` mode** to allow the Printer-Application instance inside the container to access and discover printers available in the local network where the host system is in.\n- Alternatively using the internal network of the Docker instance (`-p \u003cport\u003e:8000` instead of `--network host -e PORT=\u003cport\u003e`) only gives access to local printers running on the host system itself.\n\n### Setting Up and Running hplip-printer-app locally\n\n#### Prerequisites\n\n**Docker Installed**: Ensure Docker is installed on your system. You can download it from the [official Docker website](https://www.docker.com/get-started) or from the Snap Store:\n```sh\n  sudo snap install docker\n```\n\n**Rockcraft**: Rockcraft should be installed. You can install Rockcraft using the following command:\n```sh\n  sudo snap install rockcraft --classic\n```\n\n**Skopeo**: Skopeo should be installed to compile `*.rock` files into Docker images. It comes bundled with Rockcraft, so no separate installation is required.\n\n#### Step-by-Step Guide\n\n**Build hplip-printer-app rock**\n\nThe first step is to build the Rock from the `rockcraft.yaml`. This image will contain all the configurations and dependencies required to run hplip-printer-app.\n\nOpen your terminal and navigate to the directory containing your `rockcraft.yaml`, then run the following command:\n\n```sh\n  rockcraft pack -v\n```\n\n**Compile to Docker Image**\n\nOnce the rock is built, you need to compile docker image from it.\n\n```sh\n  sudo rockcraft.skopeo --insecure-policy copy oci-archive:\u003crock_image\u003e docker-daemon:hplip-printer-app:latest\n```\n\n**Run the hplip-printer-app Docker Container**\n\n```sh\n  sudo docker run -d \\\n      --name hplip-printer-app \\\n      --network host \\\n      -e PORT=\u003cport\u003e \\\n      hplip-printer-app:latest\n```\n- `PORT` is an optional environment variable used to start the printer-app on a specified port. If not provided, it will start on the default port 8000 or, if port 8000 is busy, on 8001 and so on.\n- **The container must be started in `--network host` mode** to allow the Printer-Application instance inside the container to access and discover printers available in the local network where the host system is in.\n- Alternatively using the internal network of the Docker instance (`-p \u003cport\u003e:8000` instead of `--network host -e PORT=\u003cport\u003e`) only gives access to local printers running on the host system itself.\n\n#### Setting up\n\nEnter the web interface\n\n```sh\nhttp://localhost:\u003cport\u003e/\n```\n\nUse the web interface to add a printer. Supply a name, select the\ndiscovered printer, then select make and model. Also set the installed\naccessories, loaded media and the option defaults. If the printer is a\nPostScript printer, accessory configuration and option defaults can\nalso often get polled from the printer.\n\n\u003c!-- Begin Included Components --\u003e\n## Included Components\n  - pappl v1.4.9\n  - qpdf v11.10.1\n  - ghostscript ghostpdl-10.06.0rc1_test001\n  - cups v2.4.14\n  - libcupsfilters 2.1.1\n  - libppd 2.1.1\n  - pyppd release-1-1-0\n  - hplip debian/3.22.10+dfsg0-8\n\u003c!-- End Included Components --\u003e\n\n## BUILDING WITHOUT PACKAGING OR INSTALLATION\n\nYou can also do a \"quick-and-dirty\" build without snapping and without\nneeding to install [PAPPL](https://www.msweet.org/pappl),\n[cups-filters 2.x](https://github.com/OpenPrinting/cups-filters), and\n[pappl-retrofit](https://github.com/OpenPrinting/pappl-retrofit) into\nyour system. You need a directory with the latest GIT snapshot of\nPAPPL, the latest GIT snapshot of cups-filters, and the latest GIT\nsnapshot of pappl-retrofit (master branches of each). They all need to\nbe compiled (`./autogen.sh; ./configure; make`), installing not\nneeded. Also install the header files of all needed libraries\n(installing \"libcups2-dev\" should do it).\n\nIn the directory with hplip-printer-app.c run the command line\n\n```\ngcc -o hplip-printer-app hplip-printer-app.c $PAPPL_SRC/pappl/libpappl.a $CUPS_FILTERS_SRC/.libs/libppd.a $CUPS_FILTERS_SRC/.libs/libcupsfilters.a $PAPPL_RETROFIT_SRC/.libs/libpappl-retrofit.a -ldl -lpthread  -lppd -lcups -lavahi-common -lavahi-client -lgnutls -ljpeg -lpng16 -ltiff -lz -lm -lusb-1.0 -lpam -lqpdf -lstdc++ -I. -I$PAPPL_SRC/pappl -I$CUPS_FILTERS_SRC/ppd -I$CUPS_FILTERS_SRC/cupsfilters -I$PAPPL_RETROFIT_SRC/pappl/retrofit -L$CUPS_FILTERS_SRC/.libs/ -L$PAPPL_RETROFIT_SRC/.libs/\n```\n\nThere is also a Makefile, but this needs PAPPL, cups-filters 2.x, and\npappl-retrofit to be installed into your system.\n\nRun\n\n```\n./hplip-printer-app --help\n```\n\nWhen running the non-snapped version, by default, PPD files are\nsearched for in\n\n```\n/usr/share/ppd/\n/usr/lib/cups/driver/\n/var/lib/hplip-printer-app/ppd/\n```\n\nYou can set the `PPD_PATHS` environment variable to search other\nplaces instead:\n\n```\nPPD_PATHS=/path/to/my/ppds:/my/second/place ./hplip-printer-app server\n```\n\nSimply put a colon-separated list of any amount of paths into the\nvariable. Creating a wrapper script is recommended.\n\nNote that only PPD files for the `hpcups` driver of HPLIP are\nconsidred, other PPD files are ignored.\n\nPrinters are only discovered via the `hp` backend of HPLIP (USB) or\nthe `hp-probe` utility of HPLIP (network). For the latter a wrapper\nscript named `HP` is included which makes the utility be used like a\nCUPS backend (discovery mode only). This especially makes only HP and\nApollo printers being discovered. Printers from other manufacturers\nare not supported.\n\nJobs are filtered through `hpcups` and send to the printer via the\n`hp` backend (both USB and network).\n\nThe standard (not HPLIP's) backends provided as alternative in this\nPrinter Application are CUPS' backends and not PAPPL's, meaning that\nfor USB printers CUPS' USB quirk workarounds for compatibility\nproblems are used, network printers can also be used with IPP, IPPS,\nand LPD protocols, and SNMP printer discovery is configurable.\n\nUSB Quirk rules in `/usr/share/cups/usb` and the `/etc/cups/snmp.conf`\nfile can get edited if needed.\n\nMake sure you have HPLIP installed and if you want to use standard\nbackends, CUPS (at least its backends).\n\nYou also need Ghostscript to print PDF or PostScript jobs.\n\nFor access to the test page `testpage.ps` use the TESTPAGE_DIR\nenvironment variable:\n\n```\nTESTPAGE_DIR=`pwd` PPD_PATHS=/path/to/my/ppds:/my/second/place ./hplip-printer-app server\n```\n\nor for your own creation of a test page (PostScript, PDF, PNG, JPEG,\nApple Raster, PWG Raster):\n\n```\nTESTPAGE=/path/to/my/testpage/my_testpage.ps PPD_PATHS=/path/to/my/ppds:/my/second/place ./hplip-printer-app server\n```\n\n\n## LEGAL STUFF\n\nThe HPLIP Printer Application is Copyright © 2020 by Till Kamppeter.\n\nIt is derived from the HP PCL Printer Application, a first working model of\na raster Printer Application using PAPPL. It is available here:\n\nhttps://github.com/michaelrsweet/hp-printer-app\n\nThe HP PCL Printer Application is Copyright © 2019-2020 by Michael R Sweet.\n\nThis software is licensed under the Apache License Version 2.0 with an exception\nto allow linking against GPL2/LGPL2 software (like older versions of CUPS).  See\nthe files \"LICENSE\" and \"NOTICE\" for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenprinting%2Fhplip-printer-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenprinting%2Fhplip-printer-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenprinting%2Fhplip-printer-app/lists"}