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

dev-main 2026-01-10 20:49 UTC

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 embedpdf so no external CDN is required if built correctly.
  • Filament v4 Ready: Uses InteractsWithTable, contentGrid, Stack layouts, and Alpine.js optimized components.
  • Utility Injection: Components support Closures for dynamic configuration (e.g. ->height(fn() => ...)).

License

The MIT License (MIT).