Search in sources :

Example 1 with PdfRenderer

use of android.graphics.pdf.PdfRenderer in project BookReader by JustWayward.

the class BasePDFPagerAdapter method init.

@SuppressWarnings("NewApi")
protected void init() {
    try {
        renderer = new PdfRenderer(getSeekableFileDescriptor(pdfPath));
        inflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
        PdfRendererParams params = extractPdfParamsFromFirstPage(renderer, renderQuality);
        bitmapContainer = new SimpleBitmapPool(params);
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : PdfRenderer(android.graphics.pdf.PdfRenderer) IOException(java.io.IOException)

Aggregations

PdfRenderer (android.graphics.pdf.PdfRenderer)1 IOException (java.io.IOException)1