From 11d642b8a49693cb9afbc4894a07eff873677401 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Tue, 31 Oct 2017 18:16:22 +0100 Subject: [PATCH] Updated readme --- README | 2 -- README.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index cc81f41..0000000 --- a/README +++ /dev/null @@ -1,2 +0,0 @@ -noccylabs/lpr -============= diff --git a/README.md b/README.md new file mode 100644 index 0000000..d634aab --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +noccylabs/lpr +============= + +This is a library to make it easier to work with the `lpr` tool to print +documents and images from code. + +## Installing + +Install using composer: + + $ composer require noccylabs/lpr + +## Using + +The `PrintJob` class is used to create new jobs. Create an instance, passing +the name of the document or image to print to the constructor, and then +set your options. Finally, `submit()` the job to the printer. + + use NoccyLabs\Lpr\PrintJob; + + $job = new PrintJob("image.png"); + + // Configure + $job->setPrinter("MyPrinter"); + $job->setMedia("A4"); + + // Additional options can be set like this + $job->setOption("fit-to-page", true); + + // Invoke lpr to print the image + $job->submit();