Weave 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

Tcpdf Laravel Package

tecnickcom/tcpdf

Pure-PHP library for generating PDFs and barcodes, now in maintenance-only mode: the TCPDF class is a compatibility facade delegating rendering to tc-lib-pdf, with the public API unchanged so existing code keeps working. New projects should start with tc-lib-pdf.

View on GitHub
Deep Wiki
Context7

TCPDF is a pure-PHP library for generating PDFs and barcodes. It is now in maintenance-only mode and acts as a compatibility facade over the modern tc-lib-pdf engine, preserving the legacy public API for existing integrations.

  • Unchanged TCPDF API, including AddPage(), SetFont(), writeHTML(), and Output()
  • Rendering delegated to tecnickcom/tc-lib-pdf
  • Supports text, graphics, forms, signatures, and standards-oriented output
  • Barcode generation and HTML-to-PDF workflows
  • Maintenance supported through sponsorship
Frequently asked questions about Tcpdf
Is tecnickcom/tcpdf deprecated or still maintained?
TCPDF is deprecated and in maintenance-only mode; active development has moved to tc-lib-pdf. The 7.0.x line still receives patch releases such as 7.0.17, and the package remains installed more than 100 million times across PHP projects. Existing integrations can keep using it, but new projects should start with tc-lib-pdf.
How do I install tecnickcom/tcpdf in a Laravel app with Composer?
Install it with composer require tecnickcom/tcpdf. There is no Laravel package auto-discovery, service provider, or config publishing step, so you instantiate the TCPDF class manually or through your own wrapper. The install path is unchanged from earlier 7.0.x releases.
Does TCPDF ship with a Laravel service provider or facade?
No. TCPDF is a standalone PHP library with no service provider, facade, package auto-discovery, routes, or publishable configuration. To fit Laravel dependency injection and event-driven patterns you need custom glue, typically a service class plus a facade wrapper. That boilerplate burden is unchanged in 7.0.17.
Should new Laravel projects use TCPDF or tc-lib-pdf?
New projects should use tc-lib-pdf, the modern modular successor to TCPDF. TCPDF is a compatibility facade over the tc-lib-pdf engine and is maintained only for existing installs. Choose TCPDF only where barcode generation or legacy PDF fidelity is a hard requirement.
Can TCPDF generate barcodes in Laravel?
Yes. TCPDF includes 1D and 2D barcode generation methods and remains a preferred option where barcodes or legacy PDF output are hard requirements. You still call it through manual instantiation or a custom Laravel wrapper because no native integration ships with the package.
Which Laravel and PHP versions does TCPDF support?
TCPDF is a standalone PHP library and does not formally advertise Laravel version support. It is assumed compatible with the current 7.0.x baseline, commonly Laravel 8+ and PHP 7.4+, but that must be re-verified against your PHP 8.x runtime rather than inferred from the release note. Check Composer constraints and run your own smoke tests.
Is upgrading to TCPDF 7.0.17 a breaking change from 7.0.15?
The published 7.0.17 note only links a full changelog comparing 7.0.16 to 7.0.17, with no breaking-change callout. Treat it as a constrained patch bump, but review both the 7.0.15 to 7.0.16 and 7.0.16 to 7.0.17 diffs because 7.0.16 was skipped in the prior assessment. The 291-method public API is unchanged, so existing wrappers should not need rework if those diffs are patch-only.
What license does TCPDF use, and why does Packagist show NOASSERTION?
The README states GNU LGPL v3 and points to LICENSE.TXT, but package metadata still reports NOASSERTION. Reconcile the shipped LICENSE file and composer.json against TCPDF's historical LGPL terms before relying on it in production. Legal review is advisable until that ambiguity is resolved.
How should I test TCPDF PDF generation in Laravel?
No Laravel-specific testing utilities ship with TCPDF. Generate a PDF through your wrapper, capture the Output result as a string, and assert the PDF header and expected text or structure; snapshot or smoke tests work well. Keep tests behind your adapter interface so you can swap engines later.
What are the best alternatives to TCPDF for Laravel PDF generation?
tc-lib-pdf is the direct successor and the recommended choice for new projects. barryvdh/laravel-dompdf offers tighter Laravel integration and less custom glue for standard HTML-to-PDF work. TCPDF remains reasonable only where barcode support or legacy PDF fidelity is essential.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core