Skip to content
pubscout

native_pdf_view

6.0.0+1, released 5 years ago by serge.software

Flutter plugin to render and display PDF files across Web, macOS, Windows, Android, and iOS.

Quiet but busy
$ flutter pub add native_pdf_view
Source repository

What it does

Renders PDF documents within Flutter apps using a PdfView widget and a PdfController. It supports opening files from assets, local paths, memory data, or networks via companion libraries, and offers customizable page builders and navigation controls.

AI-written summary of version 6.0.0+1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display PDF documents directly inside a multiplatform Flutter application UI.
  • You want to control page navigation, zooming, and custom page rendering for PDFs.

Skip it when

  • You only need basic file picking or downloading without rendering the PDF contents.
  • You prefer using the newer officially recommended `pdfx` package directly instead of this proxy.

Strengths

  • Cross-platform support covering Web, Windows, macOS, Android, and iOS.
  • Provides a comprehensive PdfController for page manipulation and view state management.
  • Allows custom rendering options and page builders.

Weaknesses

  • The plugin has been renamed and republished as `pdfx`, meaning this package acts primarily as a proxy.
  • Requires platform-specific setup steps for web (pdfjs) and windows (pdfium).

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
1

For web, run `flutter pub run native_pdf_view:install_web` to add pdfjs. For windows, run the installer tool to configure pdfium in CMakeLists.txt.

import 'package:native_pdf_view/native_pdf_view.dart';

final pdfController = PdfController(
  document: PdfDocument.openAsset('assets/sample.pdf'),
);

Widget pdfView() => PdfView(
  controller: pdfController,
);

Alternatives

Packages that do the same job and could replace native_pdf_view.

Works with

Packages commonly used together with native_pdf_view: ones it builds on, ones built on it, and its own family.