Class MCRPDFTools

java.lang.Object
org.mycore.iview2.frontend.MCRPDFTools
All Implemented Interfaces:
AutoCloseable

public class MCRPDFTools extends Object implements AutoCloseable
Author:
Thomas Scheffler (yagee)
  • 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 ignored
      pdfFile - - the file from which the thumbnail will be taken
      centered - - if true, a square (thumbnail with same width and height) will be returned
      Returns:
      a BufferedImage as thumbnail
      Throws:
      IOException
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception