Package org.mycore.iview2.frontend
Class MCRPDFTools
java.lang.Object
org.mycore.iview2.frontend.MCRPDFTools
- All Implemented Interfaces:
AutoCloseable
- Author:
- Thomas Scheffler (yagee)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static BufferedImage
getThumbnail
(int thumbnailSize, Path pdfFile, boolean centered) This method returns a Buffered Image as thumbnail if an initial page was set, it will be return - if not the first pagestatic BufferedImage
getThumbnail
(Path pdfFile, int thumbnailSize, boolean centered) Deprecated.
-
Method Details
-
getThumbnail
@Deprecated public static BufferedImage getThumbnail(Path pdfFile, int thumbnailSize, boolean centered) throws IOException Deprecated.The old method did not take the thumbnail size into account, if centered = false;- Throws:
IOException
- See Also:
-
getThumbnail
public static BufferedImage getThumbnail(int thumbnailSize, Path pdfFile, boolean centered) throws IOException This method returns a Buffered Image as thumbnail if an initial page was set, it will be return - if not the first page- Parameters:
thumbnailSize
- - the size: size = max(width, height) a size < 0 will return the original size and centered parameter will be ignoredpdfFile
- - the file from which the thumbnail will be takencentered
- - if true, a square (thumbnail with same width and height) will be returned- Returns:
- a BufferedImage as thumbnail
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-