2017 © Pedro Peláez
 

cakephp-plugin cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

image

samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  • Friday, January 2, 2015
  • by samokspv
  • Repository
  • 1 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 19 Versions
  • 0 % Grown

The README.md

cakephp-pdf-generator

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Use it if you want add button pdf generation to the page for task pdf generation (get data from current url, format json), (*2)

Installation

cd my_cake_app/app
git clone git://github.com/samokspv/cakephp-pdf-generator.git Plugin/PdfGenerator

or if you use git add as submodule:, (*3)

cd my_cake_app
git submodule add "git://github.com/samokspv/cakephp-pdf-generator.git" "app/Plugin/PdfGenerator"

then add plugin loading in Config/bootstrap.php, (*4)

CakePlugin::load('PdfGenerator', array('bootstrap' => true, 'routes' => true));

Usage

For example:

You url:
    http://your_domain/documents/view/14210

    http://your_domain/documents/view/14210.json - must return array data in json:
    [
        {
            "field1": "text1",
            "field2": 'text2',
            ...
            "fieldN": [
                "text1",
                "text2",
                ...
                "textN"
            ]
        },
        ...
    ]

In any place of your view where you need button:
echo $this->element('PdfGenerator.pdf/generate-link');

app/Config/core.php:
Configure::write('PdfGenerator', array(
    'pdf' => array(
        'cacheDir' => WWW_ROOT . 'cache/pdf', // link to pdf file
        'css' => WWW_ROOT . 'css/pdf/pdf.css' // link to css for pdf file
        'log' => LOGS . 'error.log', // link to log file
        'pages' => array(
            array(
                'element' => 'pdf/cover' // first page
            ),
            array(
                'element' => 'pdf/documents' // data from http://your_domain/documents/view/14210.json
            )
        ) // elements will be included in the pdf file
    )
));
Configure::write('Task', array(
    'timeout' => 60 * 60 * 24 * 5,
    'dateDiffFormat' => "%h hours, %i min, %s sec",
    'processEvents' => array(
        array(
            'model' => 'PdfGenerator.PdfGenerator',
            'key' => 'Task.taskStarted',
            'options' => array()
        ),
        array(
            'model' => 'PdfGenerator.PdfGenerator',
            'key' => 'Task.taskUpdated',
            'options' => array()
        ),
        array(
            'model' => 'PdfGenerator.PdfGenerator',
            'key' => 'Task.taskStopped',
            'options' => array()
        )
    )
));
Configure::write('App.fullBaseUrl', 'http://your_domain');

The Versions

02/01 2015

dev-master

9999999-dev http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

12/12 2014

1.0.18

1.0.18.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

11/12 2014

1.0.17

1.0.17.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

09/12 2014

1.0.16

1.0.16.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

05/12 2014

1.0.15

1.0.15.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

03/12 2014

1.0.14

1.0.14.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

03/12 2014

1.0.13

1.0.13.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

02/12 2014

1.0.12

1.0.12.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

19/09 2014

1.0.11

1.0.11.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

25/08 2014

1.0.10

1.0.10.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

07/08 2014

1.0.9

1.0.9.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

07/08 2014

1.0.8

1.0.8.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

06/08 2014

1.0.7

1.0.7.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

04/08 2014

1.0.6

1.0.6.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

04/08 2014

1.0.5

1.0.5.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

01/08 2014

1.0.4

1.0.4.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

01/08 2014

1.0.3

1.0.3.0 http://github.com/samokspv/cakephp-pdf-generator

Adds button pdf generation to the page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

31/07 2014

1.0.2

1.0.2.0 http://github.com/samokspv/cakephp-pdf-generator

Add button pdf generation in page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires

 

31/07 2014

1.0.1

1.0.1.0 http://github.com/samokspv/cakephp-pdf-generator

Add button pdf generation in page for task pdf generation (get data from current url, format json)

  Sources   Download

MIT

The Requires