{"id":15657453,"url":"https://github.com/acucchieri/actcpdfbundle","last_synced_at":"2026-03-01T06:32:55.949Z","repository":{"id":56940286,"uuid":"62092807","full_name":"acucchieri/ACTcpdfBundle","owner":"acucchieri","description":"Integration bundle for TCPDF library in Symfony","archived":false,"fork":false,"pushed_at":"2024-03-21T13:11:13.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T02:15:06.875Z","etag":null,"topics":["pdf","php","symfony","tcpdf"],"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/acucchieri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-27T22:32:27.000Z","updated_at":"2024-03-21T13:11:16.000Z","dependencies_parsed_at":"2024-10-23T05:09:52.227Z","dependency_job_id":"3dc0c8c9-c279-4b83-9ae8-1f3cbdea9664","html_url":"https://github.com/acucchieri/ACTcpdfBundle","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.15000000000000002","last_synced_commit":"9102729c4ed9089eed77a6022fa9a07ae6021119"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acucchieri%2FACTcpdfBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acucchieri%2FACTcpdfBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acucchieri%2FACTcpdfBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acucchieri%2FACTcpdfBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acucchieri","download_url":"https://codeload.github.com/acucchieri/ACTcpdfBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266237,"owners_count":20749754,"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":["pdf","php","symfony","tcpdf"],"created_at":"2024-10-03T13:07:09.130Z","updated_at":"2026-03-01T06:32:55.918Z","avatar_url":"https://github.com/acucchieri.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"ACTcpdfBundle\n=============\n\nThe `ACTcpdfBundle` integrates the [TCPDF](https://github.com/tecnickcom/TCPDF) PHP library with Symfony. This means easy-to-implement and easy-to-ouptput PDF documents in your Symfony application.\n\nInstallation\n------------\n\n### Step 1: Download the Bundle\n\nOpen a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:\n\n```\ncomposer require acucchieri/tcpdf-bundle\n```\n\nThis command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.\n\n\n### Step 2: Enable the Bundle\n\nThen, enable the bundle by adding the following line in the app/AppKernel.php file of your project:\n\n``` php\n// app/AppKernel.php\nclass AppKernel extends Kernel\n{\n    public function registerBundles()\n    {\n        $bundles = [\n            // ...\n            new AC\\TcpdfBundle\\ACTcpdfBundle(),\n        ];\n\n        // ...\n    }\n}\n```\n\nUsage\n-----\n\nUse `AC\\TcpdfBundle\\Pdf\\PdfBuider` to create your PDF document. This class extends TCPDF, see [TCPDF documentation](https://tcpdf.org) for more informations about PDF generation.\n\n\n### PDF Output\n\n`ACTcpdfBundle` provide helpers to serve your PDF\n\n#### Display the PDF in the browser\n\nReturn a Response with `Content-Disposition: inline`\n\n``` php\n$myPdf-\u003einline('my-pdf.doc');\n```\n\n#### Download the PDF\n\nReturn a Response with `Content-Disposition: attachment`\n\n``` php\n$myPdf-\u003edownload('my-pdf.doc');\n```\n\n#### Get the PDF as base64 mime multi-part email attachment (RFC 2045)\n\n``` php\n$myPdf-\u003eattachment('my-pdf.doc');\n```\n\n#### Save the PDF on a filesystem\n\n``` php\n$myPdf-\u003esave('/path/to/my-pdf.doc');\n```\n\n#### Output the PDF as string\n\n``` php\n$myPdf-\u003etoString();\n```\n\n### MultiCell Helper\n\n`AC\\TcpdfBundle\\Pdf\\PdfBuilder::addMultiCellRow($cells, $sameHeight, $nobr)` allow you to build complex tables, based on `MultiCell`.\n\n`$cells` is a multidimensional array. Each cell (array) contains :\n * The data (text or html)\n * The options.  Available options :\n  * `height` Cell height\n  * `width` Cell width\n  * `border` Draw the cell borders. Allowed values : 0 or 1. Default = 0\n  * `align` Horz alignment. Allowed values : 'L' (left), 'C' (center), 'R' (right) or 'J' (justify). Default = 'T'\n  * `valign` Vert alignment. Allowed values 'T' (top), 'M' (middle) or 'B' (bottom). Default = 'T'\n  * `fill` Indicates if the cell background must be painted. true or false. Default = false\n  * `is_html` Indicate if the data is html. See TCDPF doc for the supported tags. Default = false\n\n`$sameHeight` If set to `true` all the row cells have the same height. Default = false.\n\n`$nobr` If set to `true` the row is not break across 2 pages. Default = false.\n\nExample\n\n``` php\n$data = [\n  ['foo' =\u003e 'AAA', 'bar' =\u003e 123, 'baz' =\u003e '\u003cb\u003etext\u003cb\u003e'],\n  ['foo' =\u003e 'BBB', 'bar' =\u003e 456, 'baz' =\u003e '\u003ca href=\"https://domain.td\"\u003elink\u003c/a\u003e'],\n  ['foo' =\u003e 'CCC', 'bar' =\u003e 789, 'baz' =\u003e '\u003cul\u003e\u003cli\u003eline 1\u003c/li\u003e\u003cli\u003eline 2\u003c/li\u003e\u003c/ul\u003e'],\n];\n\nforeach ($data as $row) {\n    $pdf-\u003eaddRowCell([\n      [$row['foo'], ['with' =\u003e 30]],\n      [$row['bar'], ['width' =\u003e 40, 'align' =\u003e 'R']],\n      [$row['baz'], ['width' =\u003e 50, 'is_html' =\u003e true]],\n    ]);\n}\n```\n\n\nLicense\n-------\n\nThis bundle is under the MIT license. See the complete license [in the bundle](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facucchieri%2Factcpdfbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facucchieri%2Factcpdfbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facucchieri%2Factcpdfbundle/lists"}