Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Rendering PDFs in Android with Jetpack Compose - Including Search Functionality

Philipp Lackner via YouTube

Overview

Learn to render PDFs in Android using Jetpack Compose and implement a search function with highlighted results. Explore the PdfRenderer API to display PDF content within composables, and develop a robust search functionality that emphasizes search terms directly in the PDF. Gain hands-on experience creating a PDF bitmap converter class, handling file descriptors, and generating bitmaps and canvases. Implement a PDF viewer screen with context references and activity result launchers for PDF selection. Master the creation of lazy columns to efficiently display PDF pages, and test the rendering process on an emulator. Dive into advanced topics such as implementing a search API, managing search results with data classes, and dynamically adjusting content based on scale factors and rectangles.

Syllabus

Intro
Search Function
Coil Compost
Create PDF bitmap converter class
Read with context
Open file descriptor
Return with context
Create a bitmap
Create a canvas
Create PDF viewer screen
Context reference
Activity result launcher
Choose PDF launcher
Display a lazy column
Display a PDF page
Update the rendered pages
Test the render
Test on emulator
Open another PDF
Search PDF API
Search Results Data Class
Search Text State
Search Results
Draw Content
Calculate Scale Factor
Adjust Rect
Draw RCT

Taught by

Philipp Lackner

Reviews

Start your review of Rendering PDFs in Android with Jetpack Compose - Including Search Functionality

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.