{"id":22617522,"url":"https://github.com/raykolbe/dompdfmodule","last_synced_at":"2025-04-06T12:12:16.245Z","repository":{"id":3736292,"uuid":"4810196","full_name":"raykolbe/DOMPDFModule","owner":"raykolbe","description":"A Zend Framework module for Dompdf","archived":false,"fork":false,"pushed_at":"2018-10-05T15:13:23.000Z","size":6626,"stargazers_count":61,"open_issues_count":18,"forks_count":63,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-17T17:43:11.773Z","etag":null,"topics":["dompdf","pdf","php","php-composer","zend-framework","zf2","zf3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raykolbe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-27T15:38:51.000Z","updated_at":"2024-02-20T22:49:30.000Z","dependencies_parsed_at":"2022-09-16T02:50:47.704Z","dependency_job_id":null,"html_url":"https://github.com/raykolbe/DOMPDFModule","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raykolbe%2FDOMPDFModule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raykolbe%2FDOMPDFModule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raykolbe%2FDOMPDFModule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raykolbe%2FDOMPDFModule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raykolbe","download_url":"https://codeload.github.com/raykolbe/DOMPDFModule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478325,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dompdf","pdf","php","php-composer","zend-framework","zf2","zf3"],"created_at":"2024-12-08T20:06:44.931Z","updated_at":"2025-04-06T12:12:16.227Z","avatar_url":"https://github.com/raykolbe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"DOMPDFModule\n============\n\n[![Build Status](https://secure.travis-ci.org/raykolbe/DOMPDFModule.png?branch=master)](http://travis-ci.org/raykolbe/DOMPDFModule) [![Code Climate](https://codeclimate.com/github/raykolbe/DOMPDFModule/badges/gpa.svg)](https://codeclimate.com/github/raykolbe/DOMPDFModule) [![Test Coverage](https://codeclimate.com/github/raykolbe/DOMPDFModule/badges/coverage.svg)](https://codeclimate.com/github/raykolbe/DOMPDFModule/coverage) [![Total Downloads](https://poser.pugx.org/dino/dompdf-module/downloads)](https://packagist.org/packages/dino/dompdf-module) [![License](https://poser.pugx.org/dino/dompdf-module/license)](https://packagist.org/packages/dino/dompdf-module)\n\nThe DOMPDF module integrates the DOMPDF library with Zend Framework 2 with minimal effort on the consumer's end.\n\n## Requirements\n  - [Zend Framework 2](http://www.github.com/zendframework/zf2)\n\n## Installation\nInstallation of DOMPDFModule uses PHP Composer. For more information about\nPHP Composer, please visit the official [PHP Composer site](http://getcomposer.org/).\n\n#### Installation steps\n\n  1. `cd my/project/directory`\n  2. create a `composer.json` file with following contents:\n\n     ```json\n     {\n         \"require\": {\n             \"dino/dompdf-module\": \"dev-master\"\n         }\n     }\n     ```\n  3. install PHP Composer via `curl -s http://getcomposer.org/installer | php` (on windows, download\n     http://getcomposer.org/installer and execute it with PHP)\n  4. run `php composer.phar install`\n  5. open `my/project/directory/config/application.config.php` and add the following key to your `modules`: \n\n     ```php\n     'DOMPDFModule',\n     ```\n#### Configuration options\nYou can override options via the `dompdf_module` key in your local or global config files. See DOMPDFModule/config/module.config.php for config options.\n\n## Usage\n\n```php\n\u003c?php\n\nnamespace Application\\Controller;\n\nuse Zend\\Mvc\\Controller\\AbstractActionController;\nuse DOMPDFModule\\View\\Model\\PdfModel;\n\nclass ReportController extends AbstractActionController\n{\n    public function monthlyReportPdfAction()\n    {\n        $pdf = new PdfModel();\n        $pdf-\u003esetOption('fileName', 'monthly-report');            // \"pdf\" extension is automatically appended\n        $pdf-\u003esetOption('display', PdfModel::DISPLAY_ATTACHMENT); // Triggers browser to prompt \"save as\" dialog\n        $pdf-\u003esetOption('paperSize', 'a4');                       // Defaults to \"8x11\"\n        $pdf-\u003esetOption('paperOrientation', 'landscape');         // Defaults to \"portrait\"\n        \n        // To set view variables\n        $pdf-\u003esetVariables(array(\n          'message' =\u003e 'Hello'\n        ));\n        \n        return $pdf;\n    }\n}\n```\n## Development\nSo you want to contribute? Fantastic! Don't worry, it's easy. Local builds, tests, and code quality checks can be executed using [Docker](https://www.docker.com/).\n\n### Quick Start\n1. Install [Docker CE](https://www.docker.com/community-edition).\n2. Run the following from your terminal:\n\n```\ndocker build -t dino/dompdf-module .\ndocker run -v composer-cache:/var/lib/composer -v ${PWD}:/opt/app dino/dompdf-module\n```\n    \nSuper easy, right? Here's a quick walk through as to what's going on.\n\n* `docker build -t dino/dompdf-module .` builds a docker image that will be used for each run (i.e. each time `docker run` is executed) and tags it with the name `dino/dompdf-module`.\n* `docker run -v composer-cache:/var/lib/composer -v ${PWD}:/opt/app dino/dompdf-module` runs the default build in a new Docker container derived from the image tagged `dino/dompdf-module`. The root of the project and PHP Composer cache volume are mounted so that artifacts generated during the build process are available to you on your local machine.\n\n**Note:** You only need to run the first command once in order to build the image. The second command is what executes the build (build, tests, code quality checks, etc.).\n\n### Other Supported PHP Versions\nBy default, builds executed using Docker are done so using the [latest stable version of PHP](http://php.net/supported-versions.php). If you're adventurous you can execute builds against other [supported versions](http://php.net/supported-versions.php) of PHP.\n\n**PHP 5.6**\n\n```\ndocker build --build-arg PHP_VERSION=5.6 --tag dino/dompdf-module-php56 .\ndocker run -v composer-cache:/var/lib/composer -v ${PWD}:/opt/app dino/dompdf-module-php56\n```\n\n## To-do\n  - Add command line support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraykolbe%2Fdompdfmodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraykolbe%2Fdompdfmodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraykolbe%2Fdompdfmodule/lists"}