codifyiq_pdf_viewer 1.0.0 copy "codifyiq_pdf_viewer: ^1.0.0" to clipboard
codifyiq_pdf_viewer: ^1.0.0 copied to clipboard

A PDF viewer widget with zoom controls, a page indicator, and optional text search, powered by pdfrx.

codifyiq_pdf_viewer #

pub package

A reusable PDF viewer backed by pdfrx. Renders a document from a network URI, a local file path, or in-memory bytes via a single PdfSource parameter.

import 'package:codifyiq_pdf_viewer/codifyiq_pdf_viewer.dart';

PdfViewerWidget(
  source: PdfSource.uri(Uri.parse('https://example.com/file.pdf')),
  enableSearch: true,
  onDocumentLoaded: (pageCount) => debugPrint('Loaded $pageCount pages'),
);

What this adds on top of pdfrx #

  • Built-in search UI — a Material search bar, debounced input, match counter, and next/previous controls that wrap around at both ends.
  • Consistent zoom bounds — the minScale / maxScale you pass are honored by pinch, +/− buttons, and Ctrl/Cmd + scroll-wheel alike.
  • On-screen web zoom buttons and a page indicator overlay.
  • A unified PdfSource (value-equal variants) in place of pdfrx's separate .uri / .file / .data constructors, so swapping documents at runtime diffs cleanly.

Installation #

dependencies:
  codifyiq_pdf_viewer: ^1.0.0

For PDFs behind an authenticated endpoint, pass HTTP headers via PdfSource.uri:

PdfViewerWidget(
  source: PdfSource.uri(
    Uri.parse('https://api.example.com/documents/42.pdf'),
    headers: {'Authorization': 'Bearer $jwt'},
  ),
);

Web note: PDFs loaded via PdfSource.uri require the server to send appropriate CORS headers. PdfSource.file is not supported on the web platform.


Part of the CodifyIQ component family · pub.dev/publishers/codifyiq.com

0
likes
150
points
92
downloads

Publisher

verified publishercodifyiq.com

Weekly Downloads

A PDF viewer widget with zoom controls, a page indicator, and optional text search, powered by pdfrx.

Repository (GitHub)
View/report issues

Topics

#codifyiq #ui #widget #pdf

License

MIT (license)

Dependencies

flutter, pdfrx

More

Packages that depend on codifyiq_pdf_viewer