Download the PHP package lacv/pipo-scanner without Composer
On this page you can find all versions of the php package lacv/pipo-scanner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lacv/pipo-scanner
More information about lacv/pipo-scanner
Files in lacv/pipo-scanner
Package pipo-scanner
Short Description A professional document scanner component for Filament v3/v5, powered by OpenCV.js and jscanify. Capture, crop, filter and upload documents as PDF directly from the browser camera.
License MIT
Homepage https://github.com/LACV/pipo-scanner
Informations about the package pipo-scanner
Pipo Scanner
A professional document scanner component for Filament v3/v5, powered by OpenCV.js and jscanify.
Capture documents directly from the device camera, auto-detect edges, adjust corners, apply filters, and save as a multi-page PDF — all from the browser, with zero native dependencies.
| Ready | Editor | Filter | Saved |
|---|---|---|---|
Features
- 📷 Camera capture with real-time automatic edge detection
- ✂️ Manual corner adjustment with magnifier loupe for pixel-perfect crops
- 🎨 Three filters: color, grayscale, black & white
- 🔄 Rotation (90° steps) and horizontal flip
- 📄 Multi-page PDF — scan multiple pages into a single document
- 📁 Edit mode — open an existing document and add or replace pages
- 📱 Mobile-first — works on Android and iOS browsers (requires HTTPS)
- 🔒 Secure upload — base64 PDF sent via authenticated POST, stored on any Laravel disk
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.1 |
| Laravel | ^10.0 | ^11.0 | ^12.0 | ^13.0 |
| Filament | ^3.0 | ^5.0 |
| Livewire | ^3.0 |
Note: Camera access requires HTTPS (or
localhost). Plain HTTP over LAN will not exposenavigator.mediaDevicesin most browsers.
Installation
1. Install via Composer:
2. Publish the JS asset (required):
This copies jscanify.js to public/vendor/pipo-scanner/jscanify.js.
3. Optionally publish the config:
Register the Plugin
In your panel provider (e.g. app/Providers/Filament/AdminPanelProvider.php):
Usage
Recommended: ScannerField (native Filament field)
Drop it directly into your form schema — no extra boilerplate needed. The field state (file path) is handled automatically by Filament, just like any other field.
In edit mode the field reads its own state ($record->document_path) and shows the existing document automatically — no extra code needed.
Available options
| Method | Default | Description |
|---|---|---|
->disk('s3') |
config('pipo-scanner.disk') |
Storage disk |
->directory('contracts/2026') |
config('pipo-scanner.directory') |
Upload subdirectory |
->maxFileSize(8 * 1024 * 1024) |
config('pipo-scanner.max_file_size') |
Max upload size in bytes |
->height(450) |
580 |
Scanner panel height in px |
Full example:
Legacy: ViewField (manual wiring)
The original approach is still supported for backward compatibility.
It communicates back to Livewire via two mechanisms:
- Calls
$wire.setScannerDocumentPath(path)on the Livewire component. - Dispatches a browser event
scanner-savedwith{ path, url }.
Step 1 — Add a method to your Livewire page/resource:
Step 2 — Add the field to your form schema:
Step 3 — Pass existing document in edit mode:
How It Works
Events
Browser event
After a successful save the component dispatches:
Listen to it with Alpine.js:
Livewire method
The component automatically calls $wire.setScannerDocumentPath(path) on the parent Livewire component. Just define the method on your page/component:
Configuration
After publishing the config file (config/pipo-scanner.php):
Or via .env:
Mobile Considerations
- Android: Camera permission prompt appears on first use. The component defers
getUserMedia()until an explicit user tap to ensure the gesture context required by Android browsers. - iOS (Safari): Supported on iOS 14.3+. Requires HTTPS.
- HTTP on LAN:
navigator.mediaDevicesis not exposed. Use HTTPS orlocalhost.
Customizing the View
To override the default view, publish it:
The view will be copied to resources/views/vendor/pipo-scanner/components/scanner.blade.php.
Credits
- OpenCV.js — computer vision library for edge detection
- jscanify — document scanning library built on OpenCV.js
- jsPDF — client-side PDF generation
License
MIT — see LICENSE file.
All versions of pipo-scanner with dependencies
filament/filament Version ^3.0|^5.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0