native_pdf_view 2.0.0-dev.1 copy "native_pdf_view: ^2.0.0-dev.1" to clipboard
native_pdf_view: ^2.0.0-dev.1 copied to clipboard

outdated

Flutter plugin to render PDF files on both Android and iOS devices. Provides a Widget to render the pages using a PageView.

native_pdf_view #

Flutter Plugin to render PDF and show a PDF file on both Android 5.0+ and iOS 11.0+ devices.

Getting Started #

In your flutter project add the dependency:

pub package

dependencies:
  ...
  native_pdf_view: any

For help getting started with Flutter, view the online documentation.

Usage example #

It very simple!

import 'package:native_pdf_view/native_pdf_view.dart';

Widget pdfView() => FutureBuilder<PDFDocument>(
  // Open document
  future: PDFDocument.openAsset('assets/sample.pdf'),
  builder: (_, snapshot) {
    if (snapshot.hasData) {
      // Show document
      return PDFView(document: snapshot.data);
    }

    if (snapshot.hasError) {
      // Catch 
      return Center(
        child: Text(
          'PDF Rendering does not '
          'support on the system of this version',
        ),
      );
    }

    return Center(child: CircularProgressIndicator());
  },
);

Rendering PDF files on Android devices #

This plugin uses the Android native PdfRenderer to render the pages of PDF files and provides a widget called PdfRenderer to display the PDF page you like.

Rendering PDF files on IOS devices #

This plugin uses the IOS native PDFKit to render the pages of PDF files and provides a widget called PDFKit to display the PDF page you like.

398
likes
0
pub points
94%
popularity

Publisher

verified publisherserge.software

Flutter plugin to render PDF files on both Android and iOS devices. Provides a Widget to render the pages using a PageView.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

extended_image, flutter, meta, native_pdf_renderer

More

Packages that depend on native_pdf_view