Download the PHP package lstables/nativephp-mobile-document-scanner without Composer
On this page you can find all versions of the php package lstables/nativephp-mobile-document-scanner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nativephp-mobile-document-scanner
NativePHP Mobile Document Scanner
Native document scanning for NativePHP Mobile apps
Scan physical documents from the camera with automatic edge detection, perspective correction, multi-page support, and PDF output. The same scanner engine used by Apple Notes and Google Drive, wrapped in a clean Laravel facade.
Requirements
- PHP 8.2+
- NativePHP Mobile 3.x
- iOS 13.0+ (VisionKit — zero additional dependencies)
- Android API 21+ with at least 1.7 GB RAM (ML Kit via Google Play Services)
Installation
Register the plugin with NativePHP:
Usage
Basic scan
Scan to PDF only
Scan to JPEG pages only
Scan a single page
Full options
Scanning modes:
| Mode | What it includes |
|---|---|
base |
Crop, rotate, reorder pages |
filter |
+ Greyscale, auto-enhancement filters |
full |
+ ML-powered stain/shadow/finger removal (default) |
Listening to events
Events fire whether you use the facade or the JS bridge, and are received by your Livewire components:
JavaScript usage
For Livewire + Alpine or SPA setups, use the JS bridge directly:
ScanResult
| Property | Type | Description |
|---|---|---|
pages |
string[] |
Absolute paths to JPEG files, one per page |
pdf |
string\|null |
Absolute path to combined PDF, or null |
pageCount |
int |
Number of pages scanned |
hasPages() |
bool |
Whether any pages were captured |
hasPdf() |
bool |
Whether a PDF was generated |
firstPage() |
string\|null |
Path to the first page, or null |
toArray() |
array |
Serialise to plain array |
File locations
Scanned files are written to the device's temporary/cache directory under NativeDocumentScanner/. They persist until the OS clears the cache. Copy them to permanent storage (Laravel's Storage facade, or a file upload) before the session ends.
Platform notes
iOS
- Uses
VNDocumentCameraViewControllerfrom VisionKit — the same scanner as Apple Notes - No additional dependencies or CocoaPods required
- UI is Apple's — not customisable (this is a system constraint, not a plugin limitation)
- No gallery import available on iOS (camera-only)
Android
- Uses Google ML Kit Document Scanner API via Google Play Services
- ML models are downloaded centrally — minimal impact on app bundle size
- No camera permission required — handled by Play Services
- Gallery import can be enabled via
allowGalleryImport: true - Requires a minimum device RAM of 1.7 GB
Changelog
1.0.0
- Initial release
- VisionKit scanner (iOS)
- ML Kit Document Scanner (Android)
- Facade with
scan(),scanToPdf(),scanToJpegs(),scanSinglePage() DocumentScanned,DocumentScanCancelled,DocumentScanFailedevents- JavaScript bridge library
- Full Pest test suite
License
MIT
All versions of nativephp-mobile-document-scanner with dependencies
illuminate/support Version ^11.0|^12.0|^13.0
nativephp/mobile Version ^3.0