2017 © Pedro Peláez
 

library printer

Printing package for Nette framework

image

holabs/printer

Printing package for Nette framework

  • Monday, October 30, 2017
  • by holantomas
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 40 % Grown

The README.md

Holabs/Printer

Printer package is for easy printing in Nette framework, (*1)

Installation

Requirements: - php 7.1+ - Nette Framework, (*2)

composer require holabs/printer

Using

extensions:
    holabs.printer: Holabs\Printer\Bridges\Nette\PrinterExtension

# OPTIONAL
holabs.printer:
    auto-print: FALSE # Disable JS which call browser printing dialog
    layout: '%appDir%/presenters/template/printing/layout.latte' # Define own printing layout
    params: # Default parameters. Can be overwritten by job template options
        background: '#ffffff'
        margin: 2cm
        size: A4

# !!! You have to create your implementation of ITemplateStorage and IEntityStorage as service
<?php

namespace App\Presenters;

use Holabs\Printer;

class PrinterPresenter extends Presenter {

    /** @var string @persistent */
    public $id = NULL;

    /** @var Printer @inject */
    public $printer;

    /**
     * @param int[]|array $eid Entity ids
     */
    public function actionPrint(array $eid = []){
        $job = $this->printer->createJob($this->id, ... $eid);

        // Send to output from printer
        $this->printer->printJob($job);

        // Or using presenter method - Job implement IResponse
        $this->sendResponse($job);
    }

}

The Versions

30/10 2017

dev-master

9999999-dev

Printing package for Nette framework

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

nette printer

30/10 2017

0.1.1

0.1.1.0

Printing package for Nette framework

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

nette printer

25/10 2017

0.1

0.1.0.0

Printing package for Nette framework

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

nette printer