npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@changiapp/react-native-pdf-viewer

v1.2.3

Published

Native PDF viewer for React Native (Pdfium/PDFKit) with range-chunk download for large CloudFront PDFs

Readme

@changiapp/react-native-pdf-viewer

Native in-app PDF viewer for React Native using Pdfium (Android) and PDFKit (iOS).

Drop-in style API similar to react-native-pdf, with a Changi-owned native render stack.

Features

  • Remote and local PDF sources (https://, file://)
  • Native page rendering via TurboModule
  • Virtualized page list with lazy rendering
  • Large PDF downloads via HTTP Range chunks (avoids intermittent CloudFront/WAF 403 on ~190MB single GETs)
  • Small PDFs use a normal single GET
  • Loading, error, and retry UI

Installation

yarn add @changiapp/react-native-pdf-viewer react-native-blob-util
# or
npm install @changiapp/react-native-pdf-viewer react-native-blob-util

react-native-blob-util is a required peer.

iOS

cd ios && pod install

Android

Autolinking handles native setup.

Usage

import PdfViewer from '@changiapp/react-native-pdf-viewer';

<PdfViewer
  source={{
    uri: 'https://example.com/document.pdf',
    cache: true,
    expiration: 1800,
  }}
  onLoadComplete={(pageCount, filePath) => {
    console.log(pageCount, filePath);
  }}
  onError={(error) => {
    console.log(error.message);
  }}
  style={{ flex: 1 }}
/>;

CDN-safe headers (User-Agent, Accept, Accept-Language, Referer) are applied inside the package when omitted. Pass source.headers only for auth or overrides.

API

PdfViewer

| Prop | Type | Description | |------|------|-------------| | source.uri | string | Remote or local PDF URI | | source.headers | Record<string, string> | Optional download headers | | source.cache | boolean | Cache remote downloads | | source.expiration | number | Cache TTL in seconds (default 1800) | | onLoadComplete | (pageCount, filePath) => void | Fired when first page is ready | | onPageChanged | (page, pageCount) => void | Fired when a page is rendered | | onError | (error: Error) => void | Error callback | | renderActivityIndicator | (progress) => ReactElement | Custom loader |

clearPdfCache()

Clears rendered page files and downloaded PDF cache.

Notes

  • iOS deployment target should be 15.5+ (matches typical RN 0.81 apps).
  • For iOS CloudFront User-Agent casing issues with react-native-blob-util, keep the app patch patches/react-native-blob-util+0.22.2.patch if you use that dependency version.

License

MIT