パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.7

flutter_plugin_pdf_viewer

PDFファイルを処理するためのFlutterプラグイン。AndroidおよびiOSで動作します

30日間ダウンロード
125
いいね数
63
Pub ポイント
40

パッケージをインストール

flutter pub add flutter_plugin_pdf_viewer

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

モバイルアプリケーション内でPDFファイルを表示および処理するためのFlutterプラグインで、AndroidおよびiOSの両方のプラットフォームをサポートしています。アプリUI内にPDFを直接レンダリングするための簡単なインターフェースを提供し、ユーザーがアプリから離れることなくドキュメントを閲覧できるようにします。このプラグインは軽量であり、Flutterのウィジェットシステムとシームレスに統合されているため、ドキュメント表示機能が必要なアプリに最適です。

用途

  • ユーザーが生成したPDFを表示しています
  • アプリ内でのドキュメントの表示
  • 請求書または領収書を表示
  • デジタル教科書を読む
  • スキャンされたドキュメントのレンダリング

主な機能

  • クロスプラットフォーム対応(Android および iOS)
  • Flutterウィジェットとの簡単な統合
  • 効率的なPDFレンダリング
  • ズームとスクロールをサポート
  • 軽量で高速

適している対象

  • PDF表示が必要なモバイルアプリ
  • 教育または電子商務アプリ
  • ドキュメント管理ツール
  • 内部ビジネスアプリケーション
  • デジタルコンテンツを含むアプリ

注意事項

  • PDFの編集をサポートしていません
  • 閲覧のみに制限
  • 組み込みの検索機能がありません
  • 一部のデバイスでは、外部ファイルへのアクセス権限が必要です
  • 大規模なPDFではパフォーマンスが異なる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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:

Demo Screenshot 1

TODO

  • Allow password-protected files
  • Refactor PDFDocument.getAll() method
  • Increase 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.

カテゴリー

依存関係

依存関係一覧 5 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。