PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
This section explains how to integrate CPDFReaderView into an Android app and how to use the core viewer features for reading workflows, including document state handling, display modes, page navigation, text search, zooming, themes, and accessibility support.
If you're integrating the viewer for the first time, start with the basic setup and then move through the feature guides you need.
Starting from version 2.6.6, the ComPDF Android PDF viewer supports TalkBack accessibility, providing spoken feedback and focus guidance for key viewer interactions to help developers build a more accessible reading experience.
For first-time integration, read these pages in order:
Add CPDFReaderView to an XML layout and complete the basic setup for the PDF viewer.
Document State and Error Callbacks
Listen for document loading status, error messages, and mode changes so your app can handle failures and viewer state changes.
Configure single-page, double-page, book, flip, and continuous scrolling modes, as well as crop mode and view mode.
Jump to a target page and listen for page movement and scrolling events in the viewer.
Adjust the page zoom level to match different reading preferences and display scenarios.
Use preset themes or custom colors to support different reading environments.
Use the document outline to move through chapters and content structure more efficiently.
Manage bookmarks and jump back to saved locations in the document.
Search for keywords, highlight matched results, and extract text from page ranges.
Retrieve the text currently selected in the viewer.
Reflow page text so it fits better on different screen sizes.
Highlight Form Fields and Hyperlinks
Highlight form fields and hyperlinks to make interactive content easier to find.
Render PDF pages as images for export, preview, or downstream processing.
Customize the context menu to add quick actions during reading workflows.
TalkBack Accessibility Support
Review the supported version, validation steps, and integration guidance for TalkBack in the Android PDF viewer.