패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.7

flutter_plugin_pdf_viewer

PDF 파일을 처리하기 위한 플러터 플러그인입니다. Android 및 iOS에서 모두 작동합니다

30일 다운로드
125
좋아요
63
Pub 점수
40

패키지 설치

flutter pub add flutter_plugin_pdf_viewer

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

모바일 애플리케이션 내에서 PDF 파일을 표시하고 처리하기 위해 설계된 플러터 플러그인으로, 안드로이드 및 iOS 플랫폼을 모두 지원합니다. 앱 UI 내에서 PDF를 직접 렌더링할 수 있는 간단한 인터페이스를 제공하여 사용자가 앱을 벗어나지 않고도 문서를 볼 수 있도록 합니다. 이 플러그인은 가볍고 플러터의 위젯 시스템과 원활하게 통합되어 문서 보기 기능이 필요한 앱에 적합합니다.

사용 사례

  • 사용자가 생성한 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.