a21ns1g4ts / filament-embedpdf
This is my package filament-embedpdf
Fund package maintenance!
a21ns1g4ts
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/a21ns1g4ts/filament-embedpdf
Requires
- php: ^8.2
- filament/filament: ^4.0
- illuminate/contracts: ^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0
- pestphp/pest: ^4.1
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
This package is auto-updated.
Last update: 2026-01-10 20:51:30 UTC
README
Integrate @embedpdf/snippet into your Filament v4 applications specifically designed to view and manage PDFs with a premium experience.
Installation
Install the package via composer:
composer require a21ns1g4ts/filament-embedpdf
Panel Setup
Add the FilamentEmbedPDFPlugin to your panel configuration:
use A21ns1g4ts\FilamentEmbedPDF\FilamentEmbedPDFPlugin; public function panel(Panel $panel): Panel { return $panel // ... ->plugin(FilamentEmbedPDFPlugin::make()); }
Usage
Infolist Entry
Display a PDF viewer in your Infolist:
use A21ns1g4ts\FilamentEmbedPDF\Infolists\Components\EmbedPdfEntry; EmbedPdfEntry::make('document_url') ->label('Contract') ->height('500px')
Form Field
Allow users to preview a PDF from a URL in a Form:
use A21ns1g4ts\FilamentEmbedPDF\Forms\Components\EmbedPdfField; EmbedPdfField::make('url') ->label('PDF URL') ->height('600px')
Table Column
Add a preview button/icon in your table:
use A21ns1g4ts\FilamentEmbedPDF\Tables\Columns\EmbedPdfColumn; EmbedPdfColumn::make('url') ->label('Preview')
Document Manager
The plugin registers a Document Manager page automatically. You can access it via the navigation. This page lists documents (currently mock data) in a grid layout with viewing capabilities.
Features
- Standalone Viewer: Bundles
embedpdfso no external CDN is required if built correctly. - Filament v4 Ready: Uses
InteractsWithTable,contentGrid,Stacklayouts, and Alpine.js optimized components. - Utility Injection: Components support Closures for dynamic configuration (e.g.
->height(fn() => ...)).
License
The MIT License (MIT).