{"id":15077773,"url":"https://github.com/sampart/whiteoctobertcpdfbundle","last_synced_at":"2025-10-05T11:32:00.574Z","repository":{"id":2547936,"uuid":"3525967","full_name":"sampart/WhiteOctoberTCPDFBundle","owner":"sampart","description":"A bundle to facilitate using TCPDF for PDF generation in Symfony applications","archived":true,"fork":false,"pushed_at":"2020-11-15T19:30:06.000Z","size":37,"stargazers_count":89,"open_issues_count":7,"forks_count":42,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-04-04T07:03:35.795Z","etag":null,"topics":["symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sampart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-23T14:20:02.000Z","updated_at":"2023-11-11T09:58:17.000Z","dependencies_parsed_at":"2022-09-22T14:43:35.847Z","dependency_job_id":null,"html_url":"https://github.com/sampart/WhiteOctoberTCPDFBundle","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampart%2FWhiteOctoberTCPDFBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampart%2FWhiteOctoberTCPDFBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampart%2FWhiteOctoberTCPDFBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampart%2FWhiteOctoberTCPDFBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sampart","download_url":"https://codeload.github.com/sampart/WhiteOctoberTCPDFBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876996,"owners_count":16554814,"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":["symfony","symfony-bundle"],"created_at":"2024-09-25T04:32:08.769Z","updated_at":"2025-10-05T11:31:55.261Z","avatar_url":"https://github.com/sampart.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"_This project is not actively maintained. For Symfony 3.4 and above, you may wish to use [this fork](https://github.com/Qipsius/QipsiusTCPDFBundle)._\n\nWhiteOctoberTCPDFBundle\n=======================\n\nThis bundle facilitates easy use of the TCPDF PDF generation library in\nSymfony2 applications.\n\nInstallation\n------------\n\n### Step 1: Setup Bundle and dependencies\n```\ncomposer require whiteoctober/tcpdf-bundle\n```\n\n#### Version constraining (optional)\n\nBy default, this bundle does not constrain the version of TCPDF that composer installs.\n([An explanation of this unusual decision is here](https://github.com/whiteoctober/WhiteOctoberTCPDFBundle/issues/53)).\nThis means that a `composer update` could update to a new major version of TCPDF.\nSince this bundle is only a thin wrapper around TCPDF, you can normally do such an upgrade without issue.\n\nHowever, if you do wish to constrain the TCPDF version, find out what version you currently have installed with:\n\n```bash\ncomposer show tecnickcom/tcpdf\n```\n\nAnd amend your project's `composer.json` to add a TCPDF version constraint in the `requires` section.\nFor example, if TCPDF version `6.2.17` was installed, `\"tecnickcom/tcpdf\": \"^6.2.17\"` will allow anything \u003c 7 when upgrading.\n\n### Step 2: Enable the bundle in the kernel\n\nAdd the bundle to the `registerBundles()` method in your kernel:\n\nIn Symfony \u003c 4:\n\n``` php\n// app/AppKernel.php\n\u003c?php\n\npublic function registerBundles()\n{\n    $bundles = array(\n        // ...\n        new WhiteOctober\\TCPDFBundle\\WhiteOctoberTCPDFBundle(),\n    );\n}\n```\n\nIn Symfony 4:\n\n```php\n// config/bundles.php\nreturn [\n    // ...\n    WhiteOctober\\TCPDFBundle\\WhiteOctoberTCPDFBundle::class =\u003e ['all' =\u003e true],\n    // ...\n];\n```\n\n(This project is not yet configured with Symfony Flex, so this change to `config/bundles.php` won't be done automatically.)\n\nIf you want to do service autowiring, you'll need to add an alias for the service:\n\n```yaml\n# app/config/services.yml (Symfony 3)\n# config/services.yaml (Symfony 4)\nservices:\n    # ...\n\n    # the `white_october.tcpdf` service will be injected when a\n    # `WhiteOctober\\TCPDFBundle\\Controller\\TCPDFController` type-hint is detected\n    WhiteOctober\\TCPDFBundle\\Controller\\TCPDFController: '@white_october.tcpdf'\n```\n\nUsing TCPDF\n-----------\n\nYou can obtain the `white_october.tcpdf` service from the container,\nand then create a new TCPDF object via the service:\n\n``` php\n$pdfObj = $container-\u003eget(\"white_october.tcpdf\")-\u003ecreate();\n```\n\nFrom hereon in, you are using a TCPDF object to work with as normal.\n\nConfiguration\n--------------\n\n### Configuration values\n\nYou can pass parameters to TCPDF like this:\n\n```yaml\n# app/config/config.yml (Symfony \u003c 4)\n# config/packages/white_october_tcpdf.yaml (Symfony 4)\nwhite_october_tcpdf:\n    tcpdf:\n        k_title_magnification: 2\n```\n\nYou can see the default parameter values in\n`WhiteOctober\\TCPDFBundle\\DependencyInjection\\Configuration::addTCPDFConfig`.\n\nIf you want, you can use TCPDF's own defaults instead:\n\n```yaml\nwhite_october_tcpdf:\n    tcpdf:\n        k_tcpdf_external_config: false  # the values set by this bundle will be ignored\n```\n\n### Using a custom class\n\nIf you want to use your own custom TCPDF-based class, you can use\nthe `class` parameter in your configuration:\n\n```yaml\n# app/config/config.yml (Symfony \u003c 4)\n# config/packages/white_october_tcpdf.yaml (Symfony 4)\nwhite_october_tcpdf:\n    class: 'Acme\\MyBundle\\MyTCPDFClass'\n```\n\nThe class must extend from the `TCPDF` class; an exception will be\nthrown if this is not the case.\n\nLicense\n-------\n\nThis bundle is under the MIT license. See the complete license in the bundle:\n\n    Resources/meta/LICENSE\n\n_This project was originally located at https://github.com/whiteoctober/WhiteOctoberTCPDFBundle_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampart%2Fwhiteoctobertcpdfbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsampart%2Fwhiteoctobertcpdfbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampart%2Fwhiteoctobertcpdfbundle/lists"}