PHPackages                             samokspv/cakephp-pdf-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. samokspv/cakephp-pdf-generator

ActiveCakephp-plugin

samokspv/cakephp-pdf-generator
==============================

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

1.0.18(11y ago)101[1 issues](https://github.com/samokspv/cakephp-pdf-generator/issues)MITPHPPHP &gt;=5.3.0

Since Jul 31Pushed 11y ago1 watchersCompare

[ Source](https://github.com/samokspv/cakephp-pdf-generator)[ Packagist](https://packagist.org/packages/samokspv/cakephp-pdf-generator)[ Docs](http://github.com/samokspv/cakephp-pdf-generator)[ RSS](/packages/samokspv-cakephp-pdf-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (18)Used By (0)

cakephp-pdf-generator
=====================

[](#cakephp-pdf-generator)

[![Build Status](https://camo.githubusercontent.com/691c23e8e17ce2d85cc8b400193a4502acf713a8612ff9ca88e1700970b244a3/68747470733a2f2f7472617669732d63692e6f72672f73616d6f6b7370762f63616b657068702d7064662d67656e657261746f722e706e67)](https://travis-ci.org/samokspv/cakephp-pdf-generator) [![Coverage Status](https://camo.githubusercontent.com/131c2a8d0e0337290dbe653c975779e76046d9e89099f1209cb4f988bdea95e6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f73616d6f6b7370762f63616b657068702d7064662d67656e657261746f722f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/samokspv/cakephp-pdf-generator?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/5aec1d15e5011aa75259d928ffa044cc0763ae7b86f97ca18ff7147768ed4286/68747470733a2f2f706f7365722e707567782e6f72672f73616d6f6b7370762f63616b657068702d7064662d67656e657261746f722f762f737461626c652e737667)](https://packagist.org/packages/samokspv/cakephp-pdf-generator) [![Total Downloads](https://camo.githubusercontent.com/923e42c80ea7b2a3afef627c4d36561846a45de68776d00e8e0c9e6cbb1b2751/68747470733a2f2f706f7365722e707567782e6f72672f73616d6f6b7370762f63616b657068702d7064662d67656e657261746f722f646f776e6c6f6164732e737667)](https://packagist.org/packages/samokspv/cakephp-pdf-generator) [![Latest Unstable Version](https://camo.githubusercontent.com/a4a7dd9dfb8f4e5758155b5f33375d56caa22856d6cbd6a003f38d9d5134658c/68747470733a2f2f706f7365722e707567782e6f72672f73616d6f6b7370762f63616b657068702d7064662d67656e657261746f722f762f756e737461626c652e737667)](https://packagist.org/packages/samokspv/cakephp-pdf-generator) [![License](https://camo.githubusercontent.com/2979c48b0eca55e63949964465b4737f49f2dcceb6d91406c53607fce7e89c02/68747470733a2f2f706f7365722e707567782e6f72672f73616d6f6b7370762f63616b657068702d7064662d67656e657261746f722f6c6963656e73652e737667)](https://packagist.org/packages/samokspv/cakephp-pdf-generator)

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

Installation
------------

[](#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:

```
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

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

```

Usage
-----

[](#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');

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity67

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Recently: every ~2 days

Total

18

Last Release

4175d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b6c893293921e12292d6356d4d59fd7ea2144f59f9038b8bd4e439e0a5a4d26?d=identicon)[samokspv](/maintainers/samokspv)

### Embed Badge

![Health badge](/badges/samokspv-cakephp-pdf-generator/health.svg)

```
[![Health](https://phpackages.com/badges/samokspv-cakephp-pdf-generator/health.svg)](https://phpackages.com/packages/samokspv-cakephp-pdf-generator)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
