Package co.elastic.thumbnails4j.pdf
Class PDFThumbnailer
- java.lang.Object
-
- co.elastic.thumbnails4j.pdf.PDFThumbnailer
-
- All Implemented Interfaces:
Thumbnailer
public class PDFThumbnailer extends Object implements Thumbnailer
AThumbnailerfor Portable Document Formatted (PDF) documents. These documents will often have a.pdffile extension.PDFThumbnailerattempts to find the first image in the format that actually fits on a page, and returns that scaled image. This can be confusing if you attempt to thumbnail a poorly built PDF whose first page has a background image that is larger than the size of the PDF's first page. However, this approach avoids Memory issues that can occur when attempting to read undisplayably-large images.
-
-
Constructor Summary
Constructors Constructor Description PDFThumbnailer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<BufferedImage>getThumbnails(File input, List<Dimensions> dimensions)List<BufferedImage>getThumbnails(InputStream input, List<Dimensions> dimensions)
-
-
-
Method Detail
-
getThumbnails
public List<BufferedImage> getThumbnails(File input, List<Dimensions> dimensions) throws ThumbnailingException
- Specified by:
getThumbnailsin interfaceThumbnailer- Throws:
ThumbnailingException
-
getThumbnails
public List<BufferedImage> getThumbnails(InputStream input, List<Dimensions> dimensions) throws ThumbnailingException
- Specified by:
getThumbnailsin interfaceThumbnailer- Throws:
ThumbnailingException
-
-