a21ns1g4ts/filament-embedpdf
Composer 安装命令:
composer require a21ns1g4ts/filament-embedpdf
包简介
This is my package filament-embedpdf
README 文档
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).
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-10