Download the PHP package blutrixx/nativephp-pdf-renderer without Composer
On this page you can find all versions of the php package blutrixx/nativephp-pdf-renderer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blutrixx/nativephp-pdf-renderer
More information about blutrixx/nativephp-pdf-renderer
Files in blutrixx/nativephp-pdf-renderer
Package nativephp-pdf-renderer
Short Description Native PDF page rendering for NativePHP Mobile via Android PdfRenderer
License MIT
Informations about the package nativephp-pdf-renderer
Blutrixx PDF Renderer
A NativePHP Mobile plugin that renders PDF pages to images on-device, using Android's native PdfRenderer — no server round-trip, no bundled PDF.js. Useful for document previews, thumbnails, and page-by-page viewers.
Composer package: blutrixx/nativephp-pdf-renderer
Repo: joelnjoshkibona/nativephp-pdf-renderer
Current release: v1.0.0
Requirements
- PHP ^8.1 (see the package's
composer.jsonfor the exact constraint) - A Laravel app running under
nativephp/mobile^3.3 (enforced bycomposer.json; 4.x is not supported yet) - No extra Android permissions or dependencies —
android.graphics.pdf.PdfRendereris part of the Android SDK itself (API 21+).
Installation
Not on Packagist yet.
As a git submodule (how this repo itself consumes it):
Without a submodule:
Laravel auto-discovers PdfRendererServiceProvider.
How the bridge works
Every method is synchronous — no events, no native-event listening. Call it, get a real result back in the same request. $path throughout is a path to a PDF file already on-device (e.g. one you downloaded and stored locally); this package doesn't fetch remote PDFs for you.
API reference
| Method | Returns | Notes |
|---|---|---|
renderPage(string $path, int $page, int $width = 800, ?string $outputPath = null) |
array |
Renders $page (0-indexed) at $widthpx wide, preserving aspect ratio. If $outputPath is omitted the native side picks a location and returns it. |
getPageCount(string $path) |
int |
|
getPageDimensions(string $path, int $page) |
{width: int, height: int} |
Native PDF point dimensions for the given page |
renderThumbnail(string $path, string $outputPath, int $width = 320) |
array |
Convenience wrapper for a smaller preview image, written to $outputPath |