Search code examples
javaandroidpdfthumbnailsimage-generation

Create thumbnail image for PDF in Android


I'm looking for a Java library that can take a PDF and create a thumbnail image (PNG) from the first page in an Android Mobile Device.

I found this Create thumbnail image for PDF in Java but this will not work for android as it is dependent on AWT.

Please help me with the free support lib in android.


Solution

  • Apache PDFBox.

    The Apache PDFBox™ library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities. Apache PDFBox is published under the Apache License v2.0.

    In itself, it is not compatible with Android so you may want to have a look at the Android port - PdfBox-Android library.

    If you want a web service, Datalogics PDF WebAPI is an option.