pdfjs 2.1.266

pdfjs_dart #

Pub Build Status documentation


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:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:pdfjs/pdfjs.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
51
Health:
Code health derived from static analysis. [more]
93
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
52
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Oct 23, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: web

Primary library: package:pdfjs/pdfjs.dart with components: html, js.

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.

Fix lib/src/interfaces.dart. (-2.96 points)

Analysis of lib/src/interfaces.dart reported 6 hints, including:

line 91 col 5: Don't explicitly initialize variables to null.

line 91 col 15: Use = to separate a named parameter from its default value.

line 92 col 32: Use = to separate a named parameter from its default value.

line 120 col 5: Don't explicitly initialize variables to null.

line 120 col 15: Use = to separate a named parameter from its default value.

Fix lib/src/pdfjs_global.dart. (-1.99 points)

Analysis of lib/src/pdfjs_global.dart reported 4 hints:

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.

Fix lib/src/pdf_page_proxy.dart. (-1 points)

Analysis of lib/src/pdf_page_proxy.dart reported 2 hints:

line 39 col 8: Don't explicitly initialize variables to null.

line 39 col 29: Don't explicitly initialize variables to null.

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 stagehand.

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 main.dart, example.dart, and pdfjs.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.0 <3.0.0