This is a demonstration Flutter web application showcasing all the features of the Flutterish PDF Viewer package.
Visit the live demo at: https://evaisse.github.io/flutterish_pdf_viewer/
This example demonstrates how to use the flutterish_pdf_viewer package.
- Loading PDF from URL
- Basic viewer with built-in controls
- Download functionality
- Load PDF from app assets
- Handle loading states
- Error handling
- Custom navigation controls
- Styled UI components
- Advanced controller usage
flutter pub get
flutter run -d chromeflutter pub get
flutter runflutter build web --releaseThe output will be in build/web/.
final controller = PdfController();
await controller.loadFromUrl('https://example.com/sample.pdf');final ByteData data = await rootBundle.load('assets/sample.pdf');
final Uint8List bytes = data.buffer.asUint8List();
await controller.loadFromBytes(bytes);final path = await controller.downloadPdf('my_document.pdf');
print('PDF saved to: $path');// Go to next page
controller.nextPage();
// Go to previous page
controller.previousPage();
// Go to specific page
controller.goToPage(5);Main viewer widget with customizable options.
Convenience widget for loading from URL.
Convenience widget for loading from bytes.
To test with different PDFs, you can use:
- https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf (small test file)
- https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf (sample with content)
The current implementation provides a framework for PDF viewing. Full PDF rendering requires additional parsing and rendering capabilities.