Explore Android PDF development with practical code samples
Add a page during scroll
Shows how to detect when a document has been scrolled to the end and how to add a new page at the end of the document.AI Assistant Compose
AI chat for intelligent document analysis and interaction using our Jetpack Compose API. You must also run the AI Assistant demo server on your Machin...AI Assistant Multiple Documents: Compose HorizontalPager
AI chat for intelligent document analysis and interaction with multiple documents using HorizontalPager in Jetpack Compose. You must also run the AI A...AI Assistant Multiple Documents: DocumentCoordinator
Example demonstrating AI chat for multiple documents analysis and interaction using DocumentCoordinator. You must also run the AI Assistant demo serve...AI Assistant Multiple Documents: ViewPager
Example demonstrating AI chat for multiple documents analysis and interaction using ViewPager. You must also run the AI Assistant demo server on your ...Bookmark Highlighting
Shows how to use the drawable API to put a indicator on all bookmarked pages in the thumbnail bar and thumbnail grid.Custom Activity with Form Editing UI
Use form editing UI within the custom activity using PdfFragment.Custom Annotation Creation Toolbar
Example showing how to use custom items in annotation creation toolbar and bind them to the annotation tool and variant.Custom Annotation Toolbar Grouping
Example of how to alter contextual toolbar menu items structure. Displayed on AnnotationCreationToolbar.Custom Electronic Signature Flow
Showcases how to use an `ElectronicSignatureFragment` to implement custom ink signature flow in custom activities using `PdfFragment`.Custom Note Annotation Hinter Provider
Example of how to create a custom annotation hinter drawable provider.Custom Outline Provider
This example shows how to use an outline provider to display a custom document outline.Custom Search UI Compose
Showcases how to build a custom search view on top of the search API in Compose.Custom Signing Example
Showcases how to use a custom signing lambda to manually sign a document with a private key.Customized ActionBar Actions
This example shows how to modify the default set of ActionBar icons to your app's needs.Digital Signatures
A simple example adding a digital signature to a document. Either basic CMS or advances PAdES. Certificate password is: testDisabled Annotation Property
Shows how to disable annotation note option in the annotation editing toolbar.Document Creation From Canvas
Shows how to create a document programmatically using an Android canvas.Document Split-view
Usage example for two PdfFragment instances sitting side-by-side in a single activity.Download from Remote URL
Shows how to download and display a remote document using the UrlDataProvider.Dynamic Multimedia Annotation
This example shows how to dynamically add multimedia annotations to a document.E-Learning Example
Shows how to swap between documents and sync view state, annotations, and bookmarks.Electronic Signature Storage Database Example
Shows how to initialize a signature storage database that can be used for storing electronic signatures.Electronic Signatures and Digital Signing Combined
This example shows how to combine a signature render created with the ElectronicSignatureDialog with digitally signing the document with a certificate...Filterable Thumbnail Grid
Shows how to combine PDF processor and customizable nature of the thumbnail grid to create filters.FTS Indexing Example
Index PDF assets and search through them using PdfLibrary and LibraryFileSystemDataSource.FTS Indexing Example (legacy)
Index all documents of the catalog app and make them searchable. Uses an older API. For a modern example with directory support, see the non-legacy ex...Generate PDF Report
Shows how to create a PDF report using our document processor. The password is: passwordInstant JSON Attachment
Import and export Instant JSON Attachment binary data for an image stamp annotation.Long-Term-Validation added to Signature
Opens an already signed document and adds LTV data to the existing signature.Persistent Annotation Sidebar
Shows how to show a persistent sidebar containing a list of all annotations.Random Document Replacement
Stress test by constantly replacing the displayed document in random time intervals.Runtime Configuration Activity Example
This example shows how to change activity configuration at runtime.Runtime Configuration Fragment Example
This example shows how to change fragment configuration at runtime.Screen Reader Example
A small screen reader that uses TTS to speak words on the document while highlighting them.Sound Annotation Data Extraction
Shows how to add a sound annotation and how to extract the audio data into a .wav file.Stamp signature parcelize
Shows how to create stamp signature and verify it has been parsed correctly upon passing between activities.Third Party Signing Example
Sign a document with PCSK@7 signature using any third party signature generator.Two Step Signing Example
Sign a document with a private key in two stages allowing for custom byte array encryption.User Interface View Modes Example
This example shows how to change user interface view mode in custom Activity.| Title | Description |
|---|---|
| Add a page during scroll | Shows how to detect when a document has been scrolled to the end and how to add a new page at the end of the document. |
| AES Encrypted File Example | Open AES encrypted PDFs without decrypting them first. |
| AI Assistant Compose | AI chat for intelligent document analysis and interaction using our Jetpack Compose API. You must also run the AI Assistant demo server on your Machin... |
| AI Assistant Multiple Documents: Compose HorizontalPager | AI chat for intelligent document analysis and interaction with multiple documents using HorizontalPager in Jetpack Compose. You must also run the AI A... |
| AI Assistant Multiple Documents: DocumentCoordinator | Example demonstrating AI chat for multiple documents analysis and interaction using DocumentCoordinator. You must also run the AI Assistant demo serve... |
| AI Assistant Multiple Documents: ViewPager | Example demonstrating AI chat for multiple documents analysis and interaction using ViewPager. You must also run the AI Assistant demo server on your ... |
| Annotation Configuration | Shows how to customize annotation configuration. |
| Annotation Creation | Programmatic creation of annotations. |
| Annotation Creation With Alpha | Programmatic creation of annotations with alpha. |
| Annotation Flags | Showcases annotation flags. |
| Annotation Overlay | Shows annotations in overlay mode. |
| Annotation Overlay Visibility | Shows how to toggle annotation overlay visibility. |
| Annotation Rendering | Shows how to render only a custom set of annotations. |
| Annotation Selection Customization | Shows how to customize annotation selection. |
| Annotation Selection Layout | Shows how to customize the annotation selection layout. |
| Basic Example | Example of how to integrate Nutrient in a Jetpack compose application. |
| Bookmark Highlighting | Shows how to use the drawable API to put a indicator on all bookmarked pages in the thumbnail bar and thumbnail grid. |
| Compose Navigation | Shows how to use DocumentView Composable in NavHost. |
| Construction | Shows how to configure Nutrient to display a building floor plan. |
| Custom Activity with Form Editing UI | Use form editing UI within the custom activity using PdfFragment. |
| Custom Activity with Toolbars | Use toolbars within the custom activity using PdfFragment. |
| Custom Annotation Creation Toolbar | Example showing how to use custom items in annotation creation toolbar and bind them to the annotation tool and variant. |
| Custom Annotation Inspector | Shows how to customize annotation inspector. |
| Custom Annotation Toolbar Grouping | Example of how to alter contextual toolbar menu items structure. Displayed on AnnotationCreationToolbar. |
| Custom Application Policy | Example of how to customize application policy to prevent copying text. |
| Custom Data Provider | How to implement a DataProvider that can be used with PdfActivity. |
| Custom Document Sharing Dialog | Showcases how to build a custom sharing dialog. |
| Custom Document Sharing Menu | Showcases how to build a custom share menu action. |
| Custom Download Dialog Example | Showcases how to build a custom DownloadProgressFragment. |
| Custom Electronic Signature Flow | Showcases how to use an `ElectronicSignatureFragment` to implement custom ink signature flow in custom activities using `PdfFragment`. |
| Custom Form Highlight Color | Shows how to toggle the form highlight color. |
| Custom Inline Search | Example of how to use the PdfSearchViewInline in a custom layout. |
| Custom Layout Example | Use some custom layout resources to alter the activity appearance. |
| Custom New Page Template | Shows how to add custom templates to the NewPageDialog. |
| Custom Note Annotation Hinter Provider | Example of how to create a custom annotation hinter drawable provider. |
| Custom Outline Provider | This example shows how to use an outline provider to display a custom document outline. |
| Custom Search UI Compose | Showcases how to build a custom search view on top of the search API in Compose. |
| Custom Search UI | Showcases how to build a custom search view on top of the search API. |
| Custom Signing Example | Showcases how to use a custom signing lambda to manually sign a document with a private key. |
| Custom Stamp Annotations | Customizes the default set of stamps in the StampPickerDialog. |
| Customized ActionBar Actions | This example shows how to modify the default set of ActionBar icons to your app's needs. |
| Dark Theme | An example with applied custom theme. |
| Digital Signatures | A simple example adding a digital signature to a document. Either basic CMS or advances PAdES. Certificate password is: test |
| Disabled Annotation Property | Shows how to disable annotation note option in the annotation editing toolbar. |
| Document Comparison | Compare PDFs using a different stroke color for each document. |
| Document Creation From Canvas | Shows how to create a document programmatically using an Android canvas. |
| Document Download Example | How to download a PDF document from the web. |
| Document JSON | Shows how to import and export Instant Document JSON with Nutrient. |
| Document Processing Example | Showcases usage of the PdfProcessor class for document processing. |
| Document Sharing Example | How to implement custom sharing actions. |
| Document Split-view | Usage example for two PdfFragment instances sitting side-by-side in a single activity. |
| Document Switcher | Switching between documents using a side navigation drawer. |
| Download from Remote URL | Shows how to download and display a remote document using the UrlDataProvider. |
| Dynamic Multimedia Annotation | This example shows how to dynamically add multimedia annotations to a document. |
| E-Learning Example | Shows how to swap between documents and sync view state, annotations, and bookmarks. |
| Electronic Signature Storage Database Example | Shows how to initialize a signature storage database that can be used for storing electronic signatures. |
| Electronic Signatures and Digital Signing Combined | This example shows how to combine a signature render created with the ElectronicSignatureDialog with digitally signing the document with a certificate... |
| Empty Activity | Shows how to start a PdfActivity without any document loaded. |
| External Document | Choose a document from the file system. |
| File Annotation Creation | Programmatic creation of file annotations. |
| Filterable Thumbnail Grid | Shows how to combine PDF processor and customizable nature of the thumbnail grid to create filters. |
| Form Creation | Shows how to create forms programmatically. |
| Form Filling | Shows how to fill forms programmatically. |
| Form Intercept with Compose | Shows how to intercept form click with the `DocumentView` Composable. |
| Form text field suggestions | Demonstrates how to add suggestions to form text fields. |
| Forms JavaScript | Showcases how to use forms JavaScript. |
| Fragment Example | Shows how to create an activity using the PdfFragment. |
| FTS Indexing Example | Index PDF assets and search through them using PdfLibrary and LibraryFileSystemDataSource. |
| FTS Indexing Example (legacy) | Index all documents of the catalog app and make them searchable. Uses an older API. For a modern example with directory support, see the non-legacy ex... |
| Generate PDF Report | Shows how to create a PDF report using our document processor. The password is: password |
| Hide and Reveal Annotations | Allow users to select areas to hide/reveal on a page. |
| HTML-to-PDF Conversion | Shows how to convert an HTML file to a PDF. |
| Image Document | This example shows how to open a demo image document from the assets folder. |
| Image Example | Example of how to load an image using Nutrient in a Jetpack compose application. |
| Inline Multimedia | Embed videos and galleries within a PDF document. |
| Instant JSON Attachment | Import and export Instant JSON Attachment binary data for an image stamp annotation. |
| JavaScript Actions Example | Shows how to create and execute JavaScript actions. |
| JavaScript Calculator Example | Basic calculator app implemented completely in PDF JavaScript. |
| JavaScript Form Filling | Shows how to fill forms with JavaScript. |
| Kiosk Grid | Displays all documents in the assets folder. |
| Long-Term-Validation added to Signature | Opens an already signed document and adds LTV data to the existing signature. |
| Long-Term-Validation Signature | PAdES signature with added LTV and Timestamp data. |
| Measurement Tools | Shows how to read and create measurement annotations. |
| Merge Documents | Shows how to merge multiple PDFs using the document processor. |
| Multiple document pager | Shows how multiple pdfs can be utilised in a Compose Horizontal Pager |
| OCR | Performs optical character recognition (OCR) on the document. |
| Overlay View | This example shows you how to overlay views on the document. |
| Password Protected PDF | Password is: test123 |
| PDF from Image | Shows how to capture an image and convert it to a PDF. |
| PdfUiFragment Example | Shows how to use the PdfUiFragment to display documents. |
| Persistent Annotation Sidebar | Shows how to show a persistent sidebar containing a list of all annotations. |
| Persistent Tabs | Shows how to retain list of open tabs. |
| Playground Example | Start here to customize the behavior of PdfActivity. |
| Progress Data Provider Example | Showcases how to use the ProgressDataProvider. |
| Random Document Replacement | Stress test by constantly replacing the displayed document in random time intervals. |
| Reader View | Shows the reader view, which re-flows documents for easy reading. |
| Rotate Page | Shows how to temporarily apply a rotation to a page. |
| Runtime Configuration Activity Example | This example shows how to change activity configuration at runtime. |
| Runtime Configuration Fragment Example | This example shows how to change fragment configuration at runtime. |
| Screen Reader Example | A small screen reader that uses TTS to speak words on the document while highlighting them. |
| Settings for a Scientific Paper | Continuous Scrolling, Persistent User Interface, Default Style. |
| Simple Fragment Example | Most basic implementation of PdfFragment in a custom activity. |
| Sound Annotation Data Extraction | Shows how to add a sound annotation and how to extract the audio data into a .wav file. |
| Stamp signature parcelize | Shows how to create stamp signature and verify it has been parsed correctly upon passing between activities. |
| Tabbed Documents | Opens multiple documents in a tabbed interface. |
| Third Party Signing Example | Sign a document with PCSK@7 signature using any third party signature generator. |
| Try Instant | Downloads a document for collaborative editing. |
| Two Step Signing Example | Sign a document with a private key in two stages allowing for custom byte array encryption. |
| User Interface View Modes Example | This example shows how to change user interface view mode in custom Activity. |
| VerticalScrollBar Example | Example of the VerticalScrollBar widget for quick page navigation. |
| ViewPager2 Example | Demonstrates using multiple documents in a Viewpager2 |
| Watermarks | Shows how to display watermarks using Drawable API. |
| XFDF Example | Shows how to import and export annotations in XFDF format. |
| Zoom Example | Zooming to certain page objects. |