Class DPIUtils

java.lang.Object
eu.europa.esig.dss.pdf.visible.DPIUtils

public class DPIUtils extends Object
Contains util methods for DPI processing
  • Method Details

    • getTextDpi

      public static int getTextDpi()
      Returns text DPI (300)
      Returns:
      text dpi (300)
    • getDpi

      public static int getDpi(Integer dpi)
      Gets the given or default of none is provided
      Parameters:
      dpi - Integer
      Returns:
      dpi
    • computeProperSize

      public static float computeProperSize(float x, float dpi)
      Converts to full quality with the given DPI respectively to a page DPI
      Parameters:
      x - the value to convert
      dpi - the dpi to use
      Returns:
      converted value
    • getPageScaleFactor

      public static float getPageScaleFactor(Integer dpi)
      Converts the value to be displayed on a page
      Parameters:
      dpi - Integer of the image/text
      Returns:
      the converted page DPI