Download the PHP package rafaelcecchin/cups-printer without Composer

On this page you can find all versions of the php package rafaelcecchin/cups-printer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cups-printer

cups-printer πŸ–¨οΈ

After spending a lot of time searching for a simple solution to print files directly from PHP, I decided to create my own Composer library. πŸš€

Initially, I thought it would be easier to find a solution that fits different environments, but I was mistaken. Many of the existing solutions for printing with CUPS + PHP are outdated, involve a lot of code, and overlook the fact that many developers use Windows for development and Linux for production environments. πŸ–₯️➑️🐧

This project utilizes the CUPS command:

"Okay, but what about the cases you mentioned, where I work with a Windows development environment and a Linux production environment?" 🌐

It will work too, and the solution is simpler than you might think. I'll explain more about this below. πŸ‘‡

How to Use

Here’s a code snippet demonstrating the functions of the library. πŸ“œ

The only requirement is that the host must have cups-client installed. πŸ› οΈ

On Linux, you can run:

On Windows, one solution is to download Linux from the Windows Store. Yes, this is now possible through WSL technology. Just access the Windows Store, search for the Linux distribution you want, and install cups-client inside it.

In your project, you should create a class that extends CupsPrinter and, using polymorphism principles, override the cmdPrintCommand function. Here’s an example of how I did it. 🧩

In this case, I downloaded Ubuntu from the Windows Store. To run a command inside it, I prepend ubuntu run before the lp command and also adjust the file path to the Unix format, adding /mnt/ before the drive letter.

Simple, right? 😎

I hope this solution makes sense to you! 😊


All versions of cups-printer with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rafaelcecchin/cups-printer contains the following files

Loading the files please wait ....