Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Gotenberg Php Laravel Package

gotenberg/gotenberg-php

PHP client for the Gotenberg API to convert documents to PDF using Chromium/LibreOffice. Build requests for URL, HTML, Markdown, and Office files, then stream or save outputs. Compatible with Gotenberg 8.x via client v2.x.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Document Generation & Conversion Roadmap

    • Enable seamless conversion of dynamic web content (HTML, Markdown) and static documents (Word, Excel, etc.) into PDFs, images, or other formats.
    • Support Factur-X compliance for invoicing systems (e.g., EU e-invoicing standards).
    • Replace legacy PDF generation tools (e.g., wkhtmltopdf, custom scripts) with a modern, scalable API-driven solution.
  • Build vs. Buy Decision

    • Buy: Avoid reinventing document conversion logic (e.g., Chromium/LibreOffice integration, error handling, retries).
    • Customize: Extend Gotenberg’s capabilities (e.g., watermarks, bookmarks, encryption) via PHP without modifying core logic.
    • Cost-Effective: Self-hosted Gotenberg reduces cloud dependency (vs. paid SaaS like PDF.co or Adobe APIs).
  • Key Use Cases

    • Invoicing/Compliance: Generate Factur-X-compliant PDFs for EU tax authorities.
    • Dynamic Reports: Convert real-time web dashboards (e.g., analytics, CRM exports) to PDFs.
    • Legacy System Integration: Modernize monolithic apps by offloading PDF generation to microservices.
    • User-Generated Content: Process uploads (e.g., resumes, contracts) into standardized PDFs.
    • Batch Processing: Queue bulk conversions (e.g., monthly reports) with retries and webhooks.
  • Architectural Fit

    • Microservices: Deploy Gotenberg as a standalone service (Docker) and call it via this PHP client.
    • Event-Driven: Use webhooks to trigger conversions asynchronously (e.g., after a document upload).
    • Multi-Tenant: Isolate conversions per tenant via correlation IDs or custom headers.

When to Consider This Package

Adopt This Package If:

  • You need reliable PDF conversion from HTML, Markdown, Office docs, or screenshots with Chromium/LibreOffice under the hood.
  • Your team uses PHP/Laravel and wants a native, well-documented client (vs. raw HTTP calls).
  • You require advanced PDF features like:
    • Watermarks, stamps, encryption, bookmarks, or Factur-X compliance.
    • Chromium-specific options (e.g., waitForSelector, emulatedMediaFeatures).
    • LibreOffice rendering controls (e.g., zoom, page layout, watermarks).
  • You’re self-hosting and want to avoid vendor lock-in (Gotenberg is open-source).
  • Your use case involves batch processing or scalable conversions (e.g., 1000+ docs/month).
  • You need debugging tools like correlation IDs, custom headers, and error webhooks.

Look Elsewhere If:

  • You need serverless/managed PDF APIs (e.g., AWS Lambda + PDF.co, Adobe PDF Services).
  • Your stack is non-PHP (e.g., Node.js, Python—use Gotenberg’s native API directly).
  • You require OCR or advanced text extraction (consider Tesseract or AWS Textract).
  • You’re constrained by resource limits (Gotenberg needs ~2GB RAM for Chromium/LibreOffice).
  • You need real-time collaboration features (e.g., fillable forms with Adobe Acrobat).
  • Your team lacks DevOps expertise to deploy/maintain Gotenberg containers.

How to Pitch It (Stakeholders)

For Executives:

"Gotenberg + This PHP Client = A Scalable, Cost-Effective PDF Engine for [Product Name]."

  • Problem: Generating PDFs from dynamic content (e.g., invoices, reports) is slow, buggy, or relies on outdated tools like wkhtmltopdf.
  • Solution: Deploy Gotenberg (a self-hosted API using Chromium/LibreOffice) and use this PHP client to:
    • Convert any document format (HTML, Word, Excel) to PDFs instantly.
    • Support Factur-X for EU compliance (critical for [Region] expansion).
    • Reduce cloud costs by self-hosting (vs. paying per-conversion fees to Adobe/PDF.co).
  • ROI:
    • Dev Time: Cut PDF generation dev work by 80% (no more custom scripts).
    • Scalability: Handle 10x more conversions without performance drops.
    • Compliance: Future-proof for global tax/invoicing standards.
  • Risk Mitigation:
    • Open-source, actively maintained (386 stars, 2026 releases).
    • Isolated service: Failures won’t crash your app (retries + webhooks).
  • Ask: Approve $X for cloud credits to deploy Gotenberg in staging/production.

For Engineering Teams:

"Replace Your PDF Hacks with a Battle-Tested, Extensible API."

  • Why This Over Alternatives?

    Feature Gotenberg + PHP Client wkhtmltopdf Adobe API Custom Scripts
    HTML → PDF ✅ (Chromium) ❌ (flaky)
    Office Docs ✅ (LibreOffice)
    Factur-X ✅ (New in v2.23)
    Watermarks/Stamps
    Encryption
    Self-Hosted
    Scalability ✅ (Docker) ❌ (Binary)
    Debugging ✅ (Correlation IDs)
  • Key Benefits:

    • Unified API: One client for Chromium, LibreOffice, and PDF Engines (no context-switching).
    • Laravel-Friendly: PSR-7/PSR-18 compatible; works with Guzzle, Symfony HTTP Client, etc.
    • Extensible: Add custom headers, retries, or queues (e.g., Laravel Queues + Gotenberg).
    • Future-Proof: Supports emerging standards (Factur-X, tagged PDFs) without rewrites.
  • Implementation Plan:

    1. Pilot: Deploy Gotenberg in a staging Docker container (1-hour setup).
    2. Integrate: Replace 1–2 PDF endpoints with the PHP client (e.g., invoice generation).
    3. Monitor: Use correlation IDs to debug failures in logs.
    4. Scale: Add queue workers for batch processing (e.g., monthly reports).
  • Dependencies:

    • Requires Docker (for Gotenberg) and PHP 8.1+.
    • Add gotenberg/gotenberg-php and php-http/guzzle7-adapter to composer.json.
  • Migration Path:

    • Phase 1: Replace wkhtmltopdf calls with Gotenberg::chromium()->pdf()->url().
    • Phase 2: Add LibreOffice support for Office docs (e.g., Gotenberg::libreOffice()->convert(Stream::path($docx))).
    • Phase 3: Implement webhooks for async conversions (e.g., after document uploads).

Call to Action: "Let’s prototype this in 2 sprints—if it doesn’t outperform our current solution, we’ll pivot. But given the features and maintenance, this is a no-brainer for [Product Goal]."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
cadot.eu/make
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky