{"id":14983885,"url":"https://github.com/rekalogika/gotenberg-pdf-bundle","last_synced_at":"2025-07-14T07:40:17.970Z","repository":{"id":200772481,"uuid":"706215785","full_name":"rekalogika/gotenberg-pdf-bundle","owner":"rekalogika","description":"[READ-ONLY] Symfony Bundle for generating PDF using Gotenberg API","archived":false,"fork":false,"pushed_at":"2024-09-16T13:12:48.000Z","size":18,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-12T14:25:34.391Z","etag":null,"topics":["bundle","gotenberg","margin","paper","pdf","print","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"https://rekalogika.dev/gotenberg-pdf-bundle","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/rekalogika.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},"funding":{"github":"priyadi"}},"created_at":"2023-10-17T14:18:55.000Z","updated_at":"2024-09-16T13:12:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b6df9fb-3be3-471e-ac6a-094ceae546b9","html_url":"https://github.com/rekalogika/gotenberg-pdf-bundle","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"a4e5d8eae2e99e6c3aed9ac541059bb634f0e468"},"previous_names":["rekalogika/gotenberg-pdf-bundle"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rekalogika/gotenberg-pdf-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Fgotenberg-pdf-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Fgotenberg-pdf-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Fgotenberg-pdf-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Fgotenberg-pdf-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rekalogika","download_url":"https://codeload.github.com/rekalogika/gotenberg-pdf-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Fgotenberg-pdf-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265245824,"owners_count":23734105,"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":["bundle","gotenberg","margin","paper","pdf","print","symfony","symfony-bundle"],"created_at":"2024-09-24T14:08:07.283Z","updated_at":"2025-07-14T07:40:17.910Z","avatar_url":"https://github.com/rekalogika.png","language":"PHP","funding_links":["https://github.com/sponsors/priyadi"],"categories":[],"sub_categories":[],"readme":"# rekalogika/gotenberg-pdf-bundle\n\nSymfony Bundle for generating PDF using Gotenberg.\n\n## Features\n\n* Easy provisioning with Symfony Flex, Symfony CLI, and Docker Compose. Just\n  install the bundle and you're ready to generate your first PDF.\n* Separated high-level interfaces in `rekalogika/print-contracts`. If Gotenberg\n  gets out of fashion in the future, hopefully we only need to replace this\n  package, and don't need to change our code.\n* Abstractions for paper sizes and page layouts.\n* Leverages Symfony HTTP Client. See the requests and responses in Symfony\n  profiler for debugging.\n* With the heavy lifting already done by Gotenberg, there is no need to deal\n  with Chrome instances, CLI tools, Puppeteer, NodeJS, etc.\n* Scalable architecture. Suitable for low-volume development and high-volume\n  usage alike. No need to reengineer if your usage outgrows your solution. Just\n  add more instances of Gotenberg with Docker Compose or the container\n  orchestration tool you are using.\n\n## Installation\n\nPreinstallation checklists:\n\n* Make sure Composer is installed globally, as explained in the [installation\n  chapter](https://getcomposer.org/doc/00-intro.md) of the Composer\n  documentation. Run `composer about` to verify.\n* Make sure your project has Symfony Flex installed and enabled (it is enabled\n  by default). Run `composer why symfony/flex` to verify.\n\nOpen a command console, enter your project directory, and execute:\n\n```bash\ncomposer config extra.symfony.allow-contrib true\ncomposer require rekalogika/gotenberg-pdf-bundle\n```\n\n## Quick Start\n\nChecklist:\n\n* Make sure you have Docker Compose installed. Run `docker compose version` to\n  verify.\n* Make sure you have Symfony CLI installed. Run `symfony version` to verify.\n\nTo start the Gotenberg server (and other services registered in the Docker\nCompose configuration), run:\n\n```bash\ndocker compose up -d\n```\n\nThen start the web server using Symfony CLI:\n\n```bash\nsymfony serve\n```\n\nCreate a sample controller for generating a PDF file:\n\n```php title=\"src/Controller/AppController.php\"\nnamespace App\\Controller;\n\nuse Rekalogika\\Contracts\\Print\\PageOrientation;\nuse Rekalogika\\Contracts\\Print\\PdfGeneratorInterface;\nuse Rekalogika\\Print\\PageLayout;\nuse Rekalogika\\Print\\Paper;\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\HttpFoundation\\StreamedResponse;\nuse Symfony\\Component\\Routing\\Annotation\\Route;\n\nclass AppController extends AbstractController\n{\n    #[Route('/pdf')]\n    public function index(PdfGeneratorInterface $pdfGenerator): Response\n    {\n        $pdf = $pdfGenerator-\u003egeneratePdfFromHtml(\n            htmlContent: '\u003ch1\u003eHello World\u003c/h1\u003e',\n            paper: Paper::A4(),\n            pageLayout: PageLayout::inMm(PageOrientation::Portrait, 30)\n        );\n\n        return new StreamedResponse(\n            callback: fn () =\u003e fpassthru($pdf-\u003edetach()),\n            status: 200,\n            headers: [\n                'Content-Type' =\u003e 'application/pdf',\n            ]\n        );\n    }\n}\n```\n\nThen open your browser and go to \u003chttp://localhost:8000/pdf\u003e.\n\n## Documentation\n\n[rekalogika/gotenberg-pdf-bundle](https://rekalogika.dev/gotenberg-pdf-bundle)\n\n## License\n\nMIT\n\n## Contributing\n\nThe `rekalogika/gotenberg-pdf-bundle` repository is a read-only repo split from\nthe main repo. Issues and pull requests should be submitted to the\n[rekalogika/print-src](https://github.com/rekalogika/print-src) monorepo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frekalogika%2Fgotenberg-pdf-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frekalogika%2Fgotenberg-pdf-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frekalogika%2Fgotenberg-pdf-bundle/lists"}