PSPDFKit for Android — Android PDF Library

Everything You Need
to Add PDF Support to Your Android Apps

A high-performance viewer, extensive annotation and document editing tools, digital signatures, and more. All engineered for the best possible user and developer experience. PSPDFKit — the Android PDF SDK made for you.

The data you submit is treated confidentially and will never be disclosed to third parties.
We may occasionally send you product news and important announcements.

PSPDFKit is trusted by some of the world’s leading companies
Plangrid
Disney
Docusign
Dropbox
Evernote
Ibm
Lufthansa
Mercedes-benz
Sap
Siemens
United-airlines

Free 60-Day Trial

Download PSPDFKit for Android — Android PDF Library and try it in your app today.

The data you submit is treated confidentially and will never be disclosed to third parties.
We may occasionally send you product news and important announcements.

Showcase

Apps Powered by PSPDFKit

We’re extremely proud of all the amazing apps that have been built with the help of PSPDFKit. Our main goal has always been providing developers with the highest-quality tools so they can focus on making the best apps possible.

Dropbox

Dropbox

Box

Box

Scanbot

Scanbot

Gumroad

Gumroad

Procore

Procore

Scribd

Scribd

Integration

Using PSPDFKit

PSPDFKit can be integrated with just a few lines of code,
and it comes with a rich API, which allows for complete customization.

Copy
1
2
3
4
5
6
// We are opening a document from application assets.
val documentUri = Uri.parse("file:///android_asset/document.pdf")
// Build the Intent for launching the PdfActivity.
val intent = PdfActivityIntentBuilder.fromUri(context, documentUri).build()
// Launch the activity.
context.startActivity(intent)
Copy
1
2
3
4
5
6
// We are opening a document from application assets.
Uri documentUri = Uri.parse("file:///android_asset/document.pdf");
// Build the Intent for launching the PdfActivity.
Intent intent = PdfActivityIntentBuilder.fromUri(context, documentUri).build();
// Launch the activity.
context.startActivity(intent);
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// We are opening a document from application assets.
val documentUri = Uri.parse("file:///android_asset/getting-started-guide.pdf")

// Use the configuration to set main PSPDFKit options.
val configuration = PdfActivityConfiguration.Builder(context)
    // Switch to continuous vertical scrolling.
    .scrollMode(PageScrollMode.CONTINUOUS)
    .scrollDirection(PageScrollDirection.VERTICAL)
    // Disable the thumbnail bar.
    .setThumbnailBarMode(ThumbnailBarMode.THUMBNAIL_BAR_MODE_NONE)
    // etc.
    // Finally build the configuration.
    .build()

// Build the Intent for launching PdfActivity.
val intent = PdfActivityIntentBuilder.fromUri(context, documentUri)
    // Pass the configuration here.
    .configuration(configuration)
    .build()

// Start the PdfActivity.
context.startActivity(intent)
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// We are opening a document from application assets.
Uri documentUri = Uri.parse("file:///android_asset/getting-started-guide.pdf");

// Use the configuration to set main PSPDFKit options.
PdfActivityConfiguration configuration = new PdfActivityConfiguration.Builder(context)
    // Switch to continuous vertical scrolling.
    .scrollMode(PageScrollMode.CONTINUOUS)
    .scrollDirection(PageScrollDirection.VERTICAL)
    // Disable the thumbnail bar.
    .setThumbnailBarMode(ThumbnailBarMode.THUMBNAIL_BAR_MODE_NONE)
    // etc.
    // Finally build the configuration.
    .build();

// Build the Intent for launching PdfActivity.
Intent intent = PdfActivityIntentBuilder.fromUri(context, documentUri)
    // Pass the configuration here.
    .configuration(configuration)
    .build();

// Start the PdfActivity.
context.startActivity(intent);
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Open the document.
val documentUri = // PDF document URI from a writable location.
val document = PdfDocumentLoader.openDocument(context, documentUri)

// Create a custom stamp annotation on the first page.
val stampAnnotation = StampAnnotation(0, RectF(180f, 150f, 444f, 500f), "Vector stamp")
// Set PDF from assets containing vector logo as annotation's appearance stream generator.
stampAnnotation.appearanceStreamGenerator = AssetAppearanceStreamGenerator("images/PSPDFKit_Logo.pdf")

// Add the annotation to the document.
document.getAnnotationProvider().addAnnotationToPage(stampAnnotation)

// Save the document.
document.saveIfModified()
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Open the document.
final Uri documentUri = // PDF document URI from a writable location.
PdfDocument document = PdfDocumentLoader.openDocument(context, documentUri);

// Create a custom stamp annotation on the first page.
StampAnnotation stampAnnotation = new StampAnnotation(0, new RectF(180f, 150f, 444f, 500f), "Vector stamp");
// Set PDF from assets containing vector logo as annotation's appearance stream generator.
stampAnnotation.setAppearanceStreamGenerator(new AssetAppearanceStreamGenerator("images/PSPDFKit_Logo.pdf"));

// Add the annotation to the document.
document.getAnnotationProvider().addAnnotationToPage(stampAnnotation);

// Save the document.
document.saveIfModified();

Check out our guides and API docs for more examples.

Get In Touch

If you think PSPDFKit for Android — Android PDF Library could be for you, our team will help find the best solution for your project.