flutter_indzooom_pdf_viewer 1.0.8
flutter_plugin_pdf_viewer #
A flutter plugin for handling PDF files. Works on both Android & iOS
Installation #
Add flutter_plugin_pdf_viewer as a dependency in your pubspec.yaml file.
flutter_plugin_pdf_viewer: any
Android #
No permissions required. Uses application cache directory.
iOS #
No permissions required.
How-to: #
Load PDF #
// Load from assets
PDFDocument doc = await PDFDocument.fromAsset('assets/test.pdf');
// Load from URL
PDFDocument doc = await PDFDocument.fromURL('http://www.africau.edu/images/default/sample.pdf');
// Load from file
File file = File('...');
PDFDocument doc = await PDFDocument.fromFile(file);
Load pages #
// Load specific page
PDFPage pageOne = await doc.get(page: _number);
Pre-built viewer #
Use the pre-built PDF Viewer
@override
Widget build(BuildContext context) {
Scaffold(
appBar: AppBar(
title: Text('Example'),
),
body: Center(
child: _isLoading
? Center(child: CircularProgressIndicator())
: PDFViewer(document: document)),
);
}
This code produces the following view:

TODO #
- Allow password-protected files
Refactor PDFDocument.getAll() methodIncrease page resolution- Add swipe to change page
Third-party packages used #
Name | Description |
---|---|
path_provider | A Flutter plugin for finding commonly used locations on the filesystem. Supports iOS and Android. |
flutter_cache_manager | A CacheManager to download and cache files in the cache directory of the app. Various settings on how long to keep a file can be changed. |
numberpicker | NumberPicker is a custom widget designed for choosing an integer or decimal number by scrolling spinners. |
flutter_advanced_networkimage | An advanced image provider provides caching and retrying for flutter app. Now with zoomable widget and transition to image widget. |
1.0.8 #
- Updated Circular progress indicator colors
- Updated third-party dependencies
1.0.7 #
- Updated project to meet changed requirements by Flutter
- Updated third-party dependencies
- Fixes issue #21, #23
1.0.6 #
- Fixed issue in 1.0.5 on iOS that caused xcode build to fail
1.0.5 #
- Fixed bug in iOS where due to caching of Flutter ImageProvider when switching documents old pages would persist
- Added more cases in example demo
1.0.4 #
- Refactored PDFdocument.getAllPages() method (Thanks for @SergioBernal8 for PR )
- Added white background to page (iOS)
- Changed page resolution in iOS to 300 dpi
- Moved tooltips to a proper class
1.0.3 #
- Added white background to page (Android)
- Fixed cocoapods name
- User can now define tooltips and page selection dialog strings
- Tapping on page indicator now prompts to user to page selection dialog
- Added zoom to PDFPage
1.0.2 #
- Bottom appbar no longer appears if PDF has only one page (Thanks for @markathomas for suggesting this )
- Fixed opening PDF from assets not working.
- Example now opens file from assets
1.0.1 #
- Updated readme.md and added screenshots to package
1.0.0 #
- Initial release
flutter_pdf_viewer_example #
Demonstrates how to use the flutter_pdf_viewer plugin.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
flutter_indzooom_pdf_viewer: ^1.0.8
2. Install it
You can install packages from the command line:
with Flutter:
$ flutter pub get
Alternatively, your editor might support flutter pub get
.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
import 'package:flutter_indzooom_pdf_viewer/flutter_indzooom_pdf_viewer.dart';
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
50
|
Health:
Code health derived from static analysis.
[more]
|
100
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
60
|
Overall:
Weighted score of the above.
[more]
|
67
|
We analyzed this package on Dec 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.6
Platforms
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Health suggestions
Format lib/src/viewer.dart
.
Run flutter format
to format lib/src/viewer.dart
.
Maintenance issues and suggestions
Support latest dependencies. (-20 points)
The version constraint in pubspec.yaml
does not support the latest published versions for 2 dependencies (flutter_advanced_networkimage
, rxdart
).
Homepage URL doesn't exist. (-20 points)
At the time of the analysis the homepage
field https://github.com/giulianojordao/flutter_indzooom_pdf_viewer
was unreachable.
Dependencies
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.1.0 <3.0.0 | ||
flutter | 0.0.0 | ||
flutter_advanced_networkimage | ^0.5.0 | 0.5.0 | 0.6.0-alpha.1 |
flutter_cache_manager | ^1.0.0 | 1.1.3 | |
numberpicker | ^1.0.0 | 1.1.0 | |
path_provider | ^1.1.0 | 1.4.5 | |
rxdart | ^0.21.0 | 0.21.0 | 0.22.6 |
Transitive dependencies | |||
async | 2.4.0 | ||
charcode | 1.1.2 | ||
collection | 1.14.11 | 1.14.12 | |
convert | 2.1.1 | ||
crypto | 2.1.3 | ||
flutter_svg | 0.13.1 | 0.15.0 | |
http | 0.12.0+2 | ||
http_parser | 3.1.3 | ||
infinite_listview | 1.0.1+1 | ||
meta | 1.1.7 | 1.1.8 | |
path | 1.6.4 | ||
path_drawing | 0.4.1 | ||
path_parsing | 0.1.4 | ||
pedantic | 1.8.0+1 | ||
petitparser | 2.4.0 | ||
platform | 2.2.1 | ||
sky_engine | 0.0.99 | ||
source_span | 1.5.5 | ||
sqflite | 1.1.7+3 | ||
string_scanner | 1.0.5 | ||
synchronized | 2.1.0+2 | ||
term_glyph | 1.1.0 | ||
typed_data | 1.1.6 | ||
uuid | 2.0.4 | ||
vector_math | 2.0.8 | ||
xml | 3.5.0 | 3.6.0 |