Easy printing with PHP on server side under Unix®/Linux®/MacOS-X®

PHP PrintIPP Homepage

What is PHP PrintIPP ?

PrintIPP is a PHP class (PHP5) which implements an IPP client (Internet Printing Protocol).

PrintIPP, in it's current state, is able to print both strings and files, and cancel jobs, as doing all RFC2911 operations. There is also a CUPS sub-class for it's specific stuff.

PrintIPP is distributed under GNU LGPL. Thus, it is a Free Software.

PrintIPP est une classe PHP (PHP5) implémentant un client IPP (Internet Printing Protocol)

PrintIPP, dans son état actuel, permet l'impression sur un serveur IPP de fichiers ou de chaînes (strings), et l'annulation des jobs. Toutes les fonctions de la RFC2911 sont implémentées. Est également disponible une sous-classe CUPS, avec des opérations spécifiques à ce serveur.

PrintIPP est distribué sous licence GNU LGPL. C'est donc un Logiciel Libre

What is Tiny PHP PrintIPP ?

Tiny PHP PrintIPP is a simplified version, with only one operation: PrintJob

With it's embedded http backend, it counts only 76kBytes.



Memory cost

PrintIPP costs ~1.5MBytes with all extensions loaded, while Tiny PrintIPP costs ~520kBytes.

After 42 tests in very verbose debugging mode, PrintIPP is as heavy as 2,690,816 Bytes. In quite mode, memory consumption is 1,671,408 Bytes.

Memory costs is measured with furnished http backend.


Currently, it is able to print on an IPP server, parses server's response, is able to cancel jobs, and do all REQUIRED and OPTIONAL operations from RFC2911. CUPS extention have following operations: cupsGetDefaults (get default printer attributes), cupsAcceptJobs, cupsRejectJobs (reject jobs for given printer), cupsGetPrinters (get printers's list).


  • Large files are not handled by version 0.6b. If you need to print large files, use version 0.6a or 0.7 or up.
  • It is currently tested only with CUPS. Please report if it is working with other servers to
  • SSL/TLS works with CUPS but is not capable of upgrade from standard http connection. If you need TLS with CUPS-1.1, please set up "SSLPort" to a dedicated port in cupsd.conf.


It depends on http_class, which is shipped with. http_class is in early state of developpement, so you can use:

"CLASS: HTTP protocol client" (currently, do not handle large files),
"HTTP protocol client" can be found at
License: BSD.
"CLASS: Simple Authentication and Security Layer" for authentication.
SASL backend can be found at
License: BSD.


PHP PrintIPP is distributed under LGPL, testfiles under GPL, test script and examples in documentation under BSD license, documentation under both GNU FDL (with no invariant section, no front-cover and no back-cover) and GNU GPL.
It is complex, but logical :)


tarballs can be found here.
anonymous cvs: cvs -z3 co cvs -z3 co phpprintipp


Documentation will be found in "/documentation" directory in tarball. See also "INSTALL".
Online user documentation is here.


Post your requests to the mailing list

Mailing list archives will be found here.

tests / examples

Usage exemple is given in "TEST_PrintIPP.php".
There are also working examples in documentation.
Test files (datas) are distributed under GPL, and "TEST_PrintIPP.php" under BSD license.


It is inspired by "CLASS: PHP Print", by Mick Sear, but there is no more code of it in. If you search for a very basic print client, uses it :) PrintSendLPR is available at LGPL).

example of very verbose test script (371K)

Back to top

Valid XHTML 1.1 Valid CSS!