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

패키지 상세v1.1.5

flutter_fullpdfview

안드로이드 및 IOS용 PDF 뷰어이며, 피트 정책을 포함한다. endigo의 flutter_pdfview를 기반으로 한다.

30일 다운로드
54
좋아요
27
Pub 점수
40

패키지 설치

flutter pub add flutter_fullpdfview

패키지 개요

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

안드로이드 및 iOS에서 PDF를 표시하기 위한 플러터 패키지로 사용자 정의 가능한 피팅 정책을 지원합니다. flutter_pdfview 패키지의 확장으로 제작되어 줌, 패닝, 반응형 레이아웃 조정을 지원하는 부드럽고 상호작용 가능한 PDF 보기 경험을 제공합니다. 앱에 PDF 렌더링을 통합할 수 있는 신뢰할 수 있고 크로스플랫폼 솔루션을 찾는 개발자를 위해 설계되었으며, 복잡한 구성 없이도 사용 가능합니다.

사용 사례

  • 모바일 앱에서 문서 표시
  • 사용자가 업로드한 PDF 보기
  • 전자책 또는 매뉴얼 읽기
  • 교육 앱에서 PDF 통합
  • 계약서 또는 양식 렌더링

주요 기능

  • 크로스 플랫폼 호환성 (Android 및 iOS)
  • 다중 피팅 정책 지원
  • 줌 및 팬 제스처
  • 경량이며 쉽게 통합 가능
  • 반응형 레이아웃 처리

적합한 대상

  • 모바일 앱 개발자
  • 문서 관리 앱
  • 전자학습 플랫폼
  • 콘텐츠 전달 앱
  • PDF 중심 기업 응용 프로그램

고려 사항

  • 파일 액세스를 위해 네이티브 플랫폼 권한이 필요합니다
  • Android 및 iOS에 한정 (웹/데스크톱 지원 없음)
  • 큰 PDF 파일에서는 성능이 달라질 수 있습니다
  • 내장된 PDF 편집 기능 없음
  • 하위 flutter_pdfview 구현에 의존합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_fullpdfview

Native PDF View for iOS and Android

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_fullpdfview: latest_version
2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Setup
iOS

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.

4. Import it

Now in your Dart code, you can use:

import 'package:flutter_fullpdfview/flutter_fullpdfview.dart';

Options

Name Android iOS
onViewCreated V V
onRender V V
onPageChanged V V
onError V V
onPageError V X
gestureRecognizers V V
filePath V V
fitEachPage V V
defaultPage V V
dualPageMode V V
displayAsBook V V
dualPageWithBreak V V
enableSwipe V V
swipeHorizontal V V
password V V
nightMode V X
password V V
autoSpacing V V
pageFling V V
pageSnap V V
backgroundColor V V
fitPolicy V X

Only black and white are supported on Android and iOS at the moment!

Controller Options

Name Description Parameters Return
getPageCount Get total page count - Future<int>
getCurrentPage Get current page - Future<int>
setPage Go to/Set page int page Future<bool>
setPageWithAnimation Go to/Set page int page Future<bool>
resetZoom Go page and fitToWidth int page Future<bool>
getZoom Get the current zoom double zoom Future<double>
setZoom Set the current zoom double zoom Future<double>
getPageWidth Get the pdf width double width Future<double>
getPageHeight Get the pdf height double height Future<double>

Example

PDFView(
  filePath: path,
  enableSwipe: true,
  fitEachPage: true,
  swipeHorizontal: true,
  autoSpacing: false,
  pageFling: false,
  defaultPage: 8,
  dualPageMode: orientation == Orientation.landscape,
  displayAsBook: true,
  onRender: (_pages) {
    setState(() {
      pages = _pages;
      isReady = true;
    });
  },
  onError: (error) {
    print(error.toString());
  },
  onPageError: (page, error) {
    print('$page: ${error.toString()}');
  },
  onViewCreated: (PDFViewController pdfViewController) {
    _controller.complete(pdfViewController);
  },
  onPageChanged: (int page, int total) {
    print('page change: $page/$total');
  },
),

For production usage

If you use proguard, you should include this line.

-keep class com.shockwave.**

Dependencies

Android

apv Updated From: AndroidPdfViewer

iOS (only support> 11.0)

PDFKit

카테고리

소스 저장소

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

아직 데이터가 없습니다.