Search packages, repositories and app categories

Package detailsv1.0.8

easy_pdf_viewer

A flutter plugin for handling PDF files. Works on both Android & iOS

AndroidiOS
30-day downloads
6.6K
Likes
77
Pub points
140

Install package

flutter pub add easy_pdf_viewer

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Easy PDF Viewer is a Flutter plugin designed to simplify the display and handling of PDF files in mobile applications. It supports both Android and iOS platforms, offering a straightforward integration for rendering PDFs within Flutter apps. The package provides a clean, customizable widget that enables users to view PDFs with basic navigation features like zooming and scrolling. Built with ease of use in mind, it requires minimal setup and works seamlessly with existing Flutter projects. Ideal for apps needing lightweight PDF viewing capabilities without complex configurations.

Use cases

  • Displaying PDF documents in apps
  • Integrating PDFs into educational tools
  • Viewing user-generated or downloaded PDFs
  • Embedding manuals or guides in mobile apps
  • Rendering contracts or forms on mobile

Key features

  • Cross-platform support (Android & iOS)
  • Simple API for PDF rendering
  • Built-in zoom and scroll functionality
  • Lightweight and easy to integrate
  • Customizable UI components

Suitable for

  • Developers building document-centric apps
  • Educational or enterprise applications
  • Apps requiring PDF preview functionality
  • Teams seeking quick PDF integration
  • Projects with limited development time

Considerations

  • Limited advanced PDF editing features
  • No built-in text search or annotation tools
  • Performance may vary with large PDF files
  • Depends on external native libraries for rendering
  • Not optimized for very high-resolution or complex PDFs

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

easy_pdf_viewer

A flutter plugin for handling PDF files. Works on both Android & iOS. Originally forked from (https://github.com/lohanidamodar/pdf_viewer).

Pub Package

Installation

> flutter pub add easy_pdf_viewer

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('https://www.ecma-international.org/wp-content/uploads/ECMA-262_12th_edition_june_2021.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) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Example'),
      ),
      body: Center(
          child: _isLoading
              ? Center(child: CircularProgressIndicator())
              : PDFViewer(document: document)),
    );
  }

This code produces the following view:

demo

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.

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.