~/talk

PDF Viewer then and now — PdfRenderer improvements in Android 15

TalkinJapaneseat DroidKaigi 2024 · 2024-09-11..09-13· [android, web-performance]
name:Hunachi
links:none on file
slides:none on file

Covers building a custom Android PDF viewer using the platform PdfRenderer API and Jetpack Compose, including code for Compose lists, scrolling/zoom gestures, and rotation-safe state via ViewModel. Presents fixes for crashes by adding per-renderer page locks and reducing bitmap size to view-size, implements an LRU-like bitmap cache with Coil for disk caching, and documents new Android 15 PdfRenderer features (annotations, search, forms, password handling) plus a demo Compose gestures implementation and an alpha AndroidX PDFFragment running on Android 15+.

AI-written summary · about

  1. 0:00Introduction
  2. 1:07Displaying PDFs on Android
  3. 2:35Simple PDF viewer
  4. 4:23Understanding PDFRenderer
  5. 5:04PDFRenderer from file URI
  6. 6:07PDF pages to bitmaps
  7. 7:54Display single page
  8. 8:17Multi-page PDF list
  9. 9:24Fixing multi-page crashes
  10. 10:30Thread-safe page access
  11. 10:53Zoom and pan gestures
  12. 12:45Panning restrictions
  13. 13:54Tap gestures for zoom
  14. 15:18Finalizing gestures
  15. 15:39Rotation with ViewModel
  16. 16:22Optimizing bitmap generation
  17. 17:50Testing rotation
  18. 18:13Reducing bitmap memory
  19. 19:41Bitmap caching
  20. 21:07Coil for caching
  21. 23:14Custom vs Coil caching
  22. 24:20Benchmarking performance
  23. 25:26Android 15 PDFRenderer features
  24. 26:52Displaying annotations
  25. 27:33Password-protected PDFs
  26. 28:14Extracting PDF content
  27. 28:58Text search in PDFs
  28. 29:41Interactive PDF forms
  29. 31:09Saving edited PDFs
  30. 31:53AI PDF summarization
  31. 32:16Form editing workflow
  32. 33:20AndroidX PDF library
  33. 34:28Using PDFViewerFragment
  34. 35:30Testing AndroidX viewer
  35. 36:40PDF display methods
  36. 37:24Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.