PDF document viewer in mobile app

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
PDF document viewer in mobile app
Medium
from 1 business day to 3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1050
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing PDF Document Viewer in Mobile Application

PDF viewer is a task that looks trivial until you encounter a 200-page PDF on iPhone SE: scrolling stutters, memory grows, app gets SIGKILL from iOS. The problem is in rendering: each PDF page is a vector document requiring rasterization into raster image at specific scale and screen resolution.

Native Rendering vs WebView

<WebView source={{ uri: 'file://...' }} is the fastest way to show PDF. iOS WebKit renders PDF natively. Drawbacks: no UI control (can't add custom toolbar, annotations, search), entire PDF loads into memory. On 50+ pages — OOM risk.

Native rendering via PDFKit (iOS) and PdfRenderer (Android) provides full control but requires native modules in React Native.

react-native-pdf: Ready Solution

react-native-pdf is React Native wrapper over native PDF APIs of both platforms. Under the hood: PDFKit on iOS, PdfRenderer on Android. Page-by-page rendering — only visible pages + 1–2 buffer in memory.

import Pdf from 'react-native-pdf';

const PDFViewer = ({ uri }: { uri: string }) => {
  const [totalPages, setTotalPages] = useState(0);
  const [currentPage, setCurrentPage] = useState(1);

  return (
    <Pdf
      source={{ uri, cache: true }} // cache downloaded file
      onLoadComplete={(numberOfPages) => setTotalPages(numberOfPages)}
      onPageChanged={(page) => setCurrentPage(page)}
      onError={(error) => console.error(error)}
      style={{ flex: 1 }}
      enablePaging // page-by-page navigation, not scroll
      horizontal // horizontal mode
      fitPolicy={0} // 0 = fit width, 1 = fit height, 2 = fit both
      scale={1.0}
      minScale={0.5}
      maxScale={3.0}
    />
  );
};

cache: true — first load saves file to app cache directory. Reopening doesn't make HTTP request. Important: cache isn't managed automatically; cleanup by TTL or size needed.

Problem with Large PDFs: Lazy Page Loading

Opening PDF from URL, library downloads entire file before rendering. 50 MB PDF — user waits. Correct solution: HTTP Range requests if server supports Accept-Ranges: bytes.

Native iOS implementation via PDFDocument(url:) supports progressive rendering with URLSession Range requests. For React Native — custom native module using PDFDocument with CGPDFDataProvider for streaming loading.

For most projects simpler: show first page as placeholder (thumbnail, pre-generated on server via pdf2pic or ghostscript) while full file downloads.

Text Search and Annotations

react-native-pdf supports search via pdfRef.current?.startSearch(query) — native text search in document. Match highlighting built-in.

Annotations (highlighting, notes, signatures) — separate task. PSPDFKit — commercial SDK ($199/month) with full annotation set. For open-source: PDFTron (now Apryse) with free tier.

Security: Protected PDFs

Password-protected PDF: react-native-pdf supports password prop. Corporate DRM-protected PDF (Adobe AEPD, Microsoft IRM) — operator native libraries, not directly implemented in RN.

Flutter: syncfusion_flutter_pdfviewer

Syncfusion provides SfPdfViewer — full-featured PDF viewer for Flutter with page-by-page rendering, search and highlighting. Community license free up to $1M/year revenue.

SfPdfViewer.network(
  'https://cdn.example.com/document.pdf',
  onPageChanged: (PdfPageChangedDetails details) {
    setState(() => _currentPage = details.newPageNumber);
  },
)

Assessment

PDF viewer with caching, search and progressive loading: 2–3 weeks for one platform. Cross-platform with annotations: 4–6 weeks.