android pdf sdk
Extend your Android app with 30+ PDF SDK features
Streamline the development of your Android viewer with an SDK loaded with tools for document viewing, annotating, commenting, redacting, signing, and more.
feature-rich viewer
Customizable for you, seamless for your users
Benefits
Build faster
Save build time and costs with our ready-to-use code samples, templates, extensive documentation, and support resources.
Save resources
Reduce the overhead costs associated with building, customizing, and maintaining robust document technology internally.
Gain peace of mind
Rest easy knowing our SDKs are completely secure and always up to date, backed by the reliable PDFium-based rendering engine.
Compatibility
For cross-platform development, including support for building Android apps, we also offer SDKs for React Native and Flutter.
See it in action!
Don’t take our word for it. Experience our Android SDK today with PDF Viewer, our free demo app.
Examples
Easy code integration
1val uri = Uri.parse("file:///android_asset/my-document.pdf")
2val config = PdfActivityConfiguration.Builder(context).build()
3PdfActivity.showDocument(this, uri, config)
1final var uri = Uri.parse("file:///android_asset/my-document.pdf");
2final var config = new PdfActivityConfiguration.Builder(context).build();
3PdfActivity.showDocument(this, uri, config);
1override fun onCreate(savedInstanceState: Bundle?) {
2 super.onCreate(savedInstanceState)
3 setOnContextualToolbarLifecycleListener(this)
4}
5
6override fun onPrepareContextualToolbar(toolbar: ContextualToolbar<*>) {
7 if (toolbar is AnnotationCreationToolbar) {
8 // Get the existing menu items so we can modify them.
9 val menuItems = toolbar.menuItems
10
11 // Find and remove the ink highlighter button from the toolbar.
12 val highlighterItem = menuItems.find { it.id == R.id.pspdf__annotation_creation_toolbar_item_ink_highlighter}
13 if (highlighterItem != null) {
14 menuItems.remove(highlighterItem)
15 }
16
17 // Replace the menu items.
18 toolbar.setMenuItems(menuItems)
19 }
20}
21
22override fun onDisplayContextualToolbar(toolbar: ContextualToolbar<*>) {}
23override fun onRemoveContextualToolbar(toolbar: ContextualToolbar<*>) {}
1// Create the text on the first page.
2val freeTextAnnotation = FreeTextAnnotation(0, RectF(100f, 100f, 300f, 140f), "My Annotation")
3// Set the text color.
4freeTextAnnotation.color = Color.RED
5// Set the text size.
6freeTextAnnotation.textSize = 20f
7// Add it to the page.
8pdfFragment?.addAnnotationToPage(freeTextAnnotation, false)
1// Create the text on the first page.
2final var freeTextAnnotation = new FreeTextAnnotation(0, new RectF(100, 100, 300, 140), "My Annotation");
3// Set the text color.
4freeTextAnnotation.setColor(Color.RED);
5// Set the text size.
6freeTextAnnotation.setTextSize(20f);
7// Add it to the page.
8getPdfFragment().addAnnotationToPage(freeTextAnnotation, false);
Powered by Nutrient
We’re extremely proud of all the amazing apps that rely on Nutrient’s technology. Our main goal has always been providing developers with the highest-quality tools so they can focus on making the best apps possible.
Knowledge center
Pick your perfect solution
Nutrient SDKs are made to grow with your app. You can start with what you need now and add more tools later.
Viewing
Open all documents with high fidelity in a well-designed viewer.
Open all documents with high fidelity in a well-designed viewer.
Markup
Improve the review process with a suite of annotation tools.
Improve the review process with a suite of annotation tools.
Collaboration
Bring real-time collaboration to your documents.
Bring real-time collaboration to your documents.
Editing
Modify documents and easily edit PDF text directly in your app.
Modify documents and easily edit PDF text directly in your app.
Forms
Easy for users to fill forms. Easy for you to create them programmatically.
Easy for users to fill forms. Easy for you to create them programmatically.
Signing
Streamline contract execution and approval workflows by enabling eSignatures and PDF digital signatures.
Streamline contract execution and approval workflows by enabling eSignatures and PDF digital signatures.
Generation
Effortlessly generate PDFs from HTML and DOCX.
Effortlessly generate PDFs from HTML and DOCX.
OCR and Data Extraction
Give new life to scanned documents by easily converting them into text that's selectable and searchable.
Give new life to scanned documents by easily converting them into text that's selectable and searchable.
Document Conversion
Easily convert any Office document, image, email, or webpage into a high-quality PDF.
Easily convert any Office document, image, email, or webpage into a high-quality PDF.
Security and Compliance
Protect sensitive information and meet regulatory requirements within your application.
Protect sensitive information and meet regulatory requirements within your application.
Latest from the blog
Blog