pdf_viewer_jk 2.1.5 copy "pdf_viewer_jk: ^2.1.5" to clipboard
pdf_viewer_jk: ^2.1.5 copied to clipboard

discontinued

A flutter plugin for viewing PDF files in mobile app (Android & iOS).

PDF Viewer (JK) #

A flutter plugin for viewing PDF files in mobile app (Android & iOS)

Pub.dev

    https://pub.dev/packages/pdf_viewer_jk
copied to clipboard

Github

    https://github.com/jawadsahil/pdf_viewer_jk/
copied to clipboard

This plugin is based on Cross PT flutter plugin pdf viewer. Upgrades by Damodar Lohani are also incorporated.

Installation #

Add pdf_viewer_jk as a dependency in your pubspec.yaml file.

pdf_viewer_jk: any
copied to clipboard

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);
copied to clipboard

Load pages

// Load specific page
PDFPage pageOne = await doc.get(page: _number);
copied to clipboard

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)),
    );
  }
copied to clipboard
16
likes
70
points
130
downloads

Publisher

verified publisherjawad.pro

Weekly Downloads

2024.09.08 - 2025.03.23

A flutter plugin for viewing PDF files in mobile app (Android & iOS).

Homepage
Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

async, flutter, flutter_cache_manager, flutter_spinbox, flutter_svg, http, path, path_provider, pool

More

Packages that depend on pdf_viewer_jk