2017 © Pedro Peláez
 

library webprint

A PHP library with the goal of printing directly to network printers or outputting the same content to a web page.

image

exchangecore/webprint

A PHP library with the goal of printing directly to network printers or outputting the same content to a web page.

  • Sunday, November 30, 2014
  • by EC-Joe
  • Repository
  • 2 Watchers
  • 2 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Purpose

The purpose of this library is to allow a common PHP api which will allow printing directly to print devices or outputting the same content to other interfaces, such as your web browser., (*1)

Supported Printers

  • Web Browser
  • Sato E/Pro Network Printers

Features

  • Text Output
    • Font Size
  • Code 39 Barcode
    • Barcode Height
    • Bar Widths

Sample Usage

Web Browser Sample

<?php
$printer = new exchangecore\webprint\src\printers\WebPrinter();
$printer
    ->setBaseReference(0.25, 0.25, $printer::UNIT_INCHES)
    ->setFontSize(20)
    ->outputText('HELLO WORLD')
    ->setPosition(0, 0.25, $printer::UNIT_INCHES)
    ->outputCode39('*123456789*', 16, $printer::UNIT_POINT, 4)
    ->processCommandStack();

Network Printer Sample

<?php
$printer = new exchangecore\webprint\src\printers\sato\M8400rve();
$printer                       
    ->setPaperWidth(4, $printer::UNIT_INCHES)
    ->setBaseReference(0.25, 0.25, $printer::UNIT_INCHES)
    ->setFontSize(20)
    ->outputText('HELLO WORLD')
    ->setPosition(0, 0.25, $printer::UNIT_INCHES)
    ->outputCode39('*123456789*', 16, $printer::UNIT_POINT, 4)
    ->setCopies(3);

if($printer->connect('10.1.0.49')){
    if($printer->processCommandStack(false)) {
        echo 'Printed Successfully';    
    } else {
        echo 'Failed to print';
    }
    $printer->disconnect();
} else {
    echo 'Failed to connect';
};

The Versions

30/11 2014

dev-master

9999999-dev https://github.com/exchangecore/webprint

A PHP library with the goal of printing directly to network printers or outputting the same content to a web page.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-gd *

 

php barcode print

30/11 2014

0.9.1-beta

0.9.1.0-beta https://github.com/exchangecore/webprint

A PHP library with the goal of printing directly to network printers or outputting the same content to a web page.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-gd *

 

php barcode print

29/11 2014

dev-develop

dev-develop https://github.com/exchangecore/webprint

A library for printing directly to printers from your web application

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-gd *

 

php barcode print

29/11 2014

0.9.0-beta

0.9.0.0-beta https://github.com/exchangecore/webprint

A library for printing directly to printers from your web application

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-gd *

 

php barcode print