搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.8

easy_pdf_viewer

一個用於處理 PDF 檔案的 Flutter 插件。可在 Android 與 iOS 上運行

AndroidiOS
近 30 天下載
6590
喜歡數
77
Pub 分數
140

安裝套件

flutter pub add easy_pdf_viewer

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Easy PDF Viewer 是一個 Flutter 插件,旨在簡化移動應用程式中 PDF 檔案的顯示與處理。它支援 Android 與 iOS 平台,為在 Flutter 應用中呈現 PDF 提供簡單直覺的整合方式。該套件提供一個乾淨、可自訂的組件,讓使用者能夠檢視 PDF,並具備基本的導航功能,例如縮放與捲動。以易用性為設計核心,設定需求極少,能順暢整合至現有的 Flutter 專案中。非常適合需要輕量級 PDF 查看功能,卻不需複雜設定的應用。

適用情境

  • 在應用程式中顯示PDF文件
  • 將PDF整合到教育工具中
  • 查看使用者產生或下載的PDF
  • 在移動應用程式中嵌入手冊或指南
  • 在移動設備上渲染合約或表單

主要特色

  • 跨平台支援(Android 與 iOS)
  • PDF 繪製的簡單 API
  • 內建縮放和滾動功能
  • 輕量且易於整合
  • 可自定義的 UI 組件

適合對象

  • 開發以文件為中心的應用程式開發者
  • 教育或企業應用
  • 需要PDF預覽功能的應用程式
  • 尋求快速PDF整合的團隊
  • 開發時間有限的項目

使用建議

  • 有限的高級PDF編輯功能
  • 無內建的文字搜尋或註解工具
  • 性能可能因大PDF檔案而異
  • 依賴外部原生庫進行渲染
  • 未針對高解析度或複雜PDF進行優化

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。