Download the PHP package sarder/pdfstudio without Composer

On this page you can find all versions of the php package sarder/pdfstudio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pdfstudio

PDF Studio for Laravel

Design, preview, and generate PDFs using HTML and TailwindCSS in Laravel.

Free and open source. All features — including template versioning, workspaces, the visual builder, and the hosted rendering API — are available under the MIT license with no key, subscription, or license fee required.

📖 Full User Guide — detailed examples, page layouts, framework integrations (Livewire, Vue, React, Node.js, vanilla JS), and troubleshooting.


Table of Contents


Requirements

Optional Dependencies

Driver Package Required For
Chromium spatie/browsershot ^5.2 Full CSS/TailwindCSS fidelity (recommended)
Cloudflare Cloudflare Browser Rendering Managed remote Chromium rendering
Gotenberg Self-hosted Gotenberg service Remote/self-hosted Chromium rendering
WeasyPrint System weasyprint binary Print-native rendering, attachments, PDF variants
dompdf dompdf/dompdf ^2.0|^3.0 Zero external dependencies, limited CSS
wkhtmltopdf System binary Good CSS fidelity, no Node.js needed

PDF Manipulation (optional):

Package Required For
setasign/fpdi ^2.3 PDF merging, watermarking
mikehaertl/php-pdftk ^4.0 AcroForm fill, password protection

Note: The Chromium driver requires Node.js and a Chromium/Chrome binary on the server.


Installation

Publish the config file:

Install optional dependencies for the features you need:

Or install them individually:

Note: PDF thumbnail generation also requires the imagick PHP extension, which must be installed separately (not via Composer).

If you're using Pro or SaaS features, publish and run migrations:


Quick Start

The Pdf facade is auto-discovered. No manual registration needed.


Drivers

Detailed driver selection and troubleshooting guide:

Driver Runtime Node CSS Fidelity Best For
chromium (default) Local Chrome + Browsershot Yes Full High-fidelity local rendering
cloudflare Cloudflare Browser Rendering No local Node Full Managed remote rendering
gotenberg Remote Gotenberg service No local Node Full Self-hosted remote rendering
weasyprint System weasyprint binary No Print-native Tagged PDFs, attachments, PDF variants
wkhtmltopdf System binary No Good Legacy compatibility
dompdf dompdf/dompdf No Limited Zero external services
fake Built-in No N/A Testing only

Install your preferred driver:

Set the default in config:

Switch per-render:

Remote driver examples:

Cloudflare config:

Gotenberg config:

WeasyPrint config:

Modern Render Options


Template Registry

Register named templates with default options and data providers:

Use a registered template:

List all registered templates:


Blade Directives


Queue / Async Rendering

Dispatch a render job to a queue:

Batch rendering:

Compose multiple sections independently and merge them into one PDF:


Preview Routes

Enable browser-based template preview (disabled in production by default):

Visit:


Tailwind CSS

Point PDF Studio at your Tailwind binary and config:

Compiled CSS is cached automatically. Clear the cache:

Fonts & Assets

Register local fonts once and PDF Studio will embed them as generated @font-face CSS during rendering:

Asset policy can inline local assets and optionally block remote ones up front:

This helps avoid renderer-specific failures around local file paths, missing images, font files, or remote asset fetches. The resolver covers:


Template Versioning

Requires: migrations (php artisan vendor:publish --tag=pdf-studio-migrations && php artisan migrate).

Save a snapshot of a template definition at any point:


Workspaces & Access Control

Requires: migrations (php artisan vendor:publish --tag=pdf-studio-migrations && php artisan migrate).

Scope projects to a workspace:


Visual Builder

Requires: pdf-studio.preview.enabled = true

The visual builder lets you define document layouts as a JSON schema of typed blocks, preview them as HTML, and export them to Blade templates.

Block Schema

Compile to HTML

Export to Blade

Live Preview API


SaaS: Hosted Rendering API

Requires: PDF_STUDIO_SAAS=true in .env and migrations.

Enable in .env:

Issue an API Key

Revoke a key:

Render Endpoints

All endpoints require:

Sync — immediate PDF response:

With a Blade view and options:

Async — queue a render job:

Poll job status:

Status values: pending | completed | failed


SaaS: Usage Metering

Record usage events with idempotency (safe to call multiple times for the same job):

Each recordRender call dispatches a BillableEvent. Hook into it to integrate your billing provider:

Query raw usage:


SaaS: Analytics

Query render stats for a workspace over a date range:


PDF Merging

Merge multiple PDFs into a single document. Requires setasign/fpdi.


PDF Post-Processing

Detailed guide:

Operate on existing PDF bytes after rendering or on PDFs produced outside PDF Studio:

isPdf() and isPdfFile() provide a cheap preflight check before queueing or manipulating uploaded content. inspectPdf() and inspectPdfFile() provide a combined summary with validity, page-count information when available, and byte_size for transport/storage planning. readPdfMetadata() / readPdfMetadataFile() extract basic document-info metadata. assertPdf() and assertPdfFile() provide a fail-fast validation path when invalid input should stop the workflow immediately. pageCount() and pageCountFile() return integers. chunkRanges() / chunkRangesFile() return plain page-range strings. chunkPlan() / chunkPlanFile() return structured planning metadata per chunk. split(), chunk(), chunkFile(), reorderPages(), rotatePages(), and removePages() handle staged page editing. flattenPdf() / flattenPdfFile() and embedFiles() / embedFilesIntoFile() return a single PdfResult.


Watermarking

Add text or image watermarks to rendered PDFs. Requires setasign/fpdi.


Password Protection

Protect PDFs with user/owner passwords. Requires mikehaertl/php-pdftk.


AcroForm Fill

Fill PDF form fields programmatically. Requires mikehaertl/php-pdftk.


Livewire / Filament

Download PDFs from Livewire components without Livewire intercepting the response:

Get base64 content for embedding:


Render Caching

Cache rendered PDFs to avoid re-rendering identical content:

Configure defaults in config:

Clear render cache:


Auto-Height Paper

Automatically size the paper height to fit content (no page breaks):

Supported by all drivers (Chromium, dompdf, wkhtmltopdf).


Header/Footer Per-Page Control

Control header and footer visibility on specific pages (Chromium and wkhtmltopdf):


Dependency Installer

Install optional dependencies interactively or all at once:

The command automatically skips packages that are already installed and shows real-time Composer output. After installation it reminds you about the imagick PHP extension if it's missing.

Feature Package
Chromium PDF driver spatie/browsershot
Dompdf PDF driver dompdf/dompdf
PDF manipulation (merge, watermark, split) setasign/fpdi
Form filling & password protection mikehaertl/php-pdftk
Barcodes (@barcode directive) picqer/php-barcode-generator
QR codes (@qrcode directive) chillerlan/php-qrcode

Diagnostics

Run a health check on your PDF Studio installation:

Checks:


Configuration Reference


Testing

PdfFake (Testing Assertions)

Use Pdf::fake() in tests for fluent assertions without real PDF rendering:

Or use the fake driver directly:


Documentation

The README covers the full API surface. For deeper guidance see the User Guide, which includes:

License

MIT — see LICENSE.


All versions of pdfstudio with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sarder/pdfstudio contains the following files

Loading the files please wait ...