Dart bindings for Mozilla's PDF.js library
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: pdfjs: ^2.1.266
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Apr 1, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.6
Health issues and suggestions
Document public APIs. (-1 points)
175 out of 175 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
lib/src/interfaces.dart. (-6.78 points)
lib/src/interfaces.dart reported 14 hints, including:
line 23 col 19: Unnecessary new keyword.
line 58 col 9: Unnecessary new keyword.
line 77 col 30: Unnecessary new keyword.
line 78 col 20: Unnecessary new keyword.
line 91 col 5: Don't explicitly initialize variables to null.
lib/src/pdfjs_global.dart. (-4.41 points)
lib/src/pdfjs_global.dart reported 9 hints, including:
line 144 col 12: Unnecessary new keyword.
line 150 col 12: 'getDocument' is deprecated and shouldn't be used.
line 155 col 12: 'getDocument' is deprecated and shouldn't be used.
line 160 col 12: 'getDocument' is deprecated and shouldn't be used.
line 166 col 12: 'getDocument' is deprecated and shouldn't be used.
lib/src/pdf_document_proxy.dart. (-3.45 points)
lib/src/pdf_document_proxy.dart reported 7 hints, including:
line 67 col 28: Unnecessary new keyword.
line 71 col 17: Unnecessary new keyword.
line 88 col 29: Unnecessary new keyword.
line 90 col 24: Unnecessary new keyword.
line 124 col 16: Unnecessary new keyword.
Fix additional 7 files with analysis or formatting issues. (-7.97 points)
Additional issues in the following files:
Maintenance issues and suggestions
Provide a file named
CHANGELOG.md. (-20 points)
Changelog entries help developers follow the progress of your package. See the example generated by
The package description is too short. (-18 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
pdfjs.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
|Dart SDK||>=1.24.0 <3.0.0|