Package jmri.util

Class PaperUtils

java.lang.Object
jmri.util.PaperUtils

public class PaperUtils extends Object
  • Constructor Details

  • Method Details

    • getPaperSizeDimension

      Returns the default paper size as a Dimension object in points
      Returns:
      The Dimension object representing the default paper size in points
    • getOrientedPaperSizeInPointsIfPossible

      Retrieves the default printer's paper size in points (1/72"), adjusted for the current default orientation. If this is not possible, returns null.
      Returns:
      The Dimension object representing the default paper size in points, or null if it is not possible to retrieve the paper size.
    • getAutomaticPaperSize

      Returns the default paper size as a PaperSize enum. This interrogates the default printer and may be slow if the printer is not available. You should probably use getPaperSizeDimension() instead as it caches the result.
      Returns:
      A Dimension object representing the default paper size in points.
    • syncPageAttributesToPrinter

      public static void syncPageAttributesToPrinter(PageAttributes pageAttr)
      Syncs the PageAttributes object to the default printer's settings.
      Parameters:
      pageAttr - The PageAttributes object to sync.