Enum FitToPaperModes

java.lang.Object
java.lang.Enum<FitToPaperModes>
com.ironsoftware.ironpdf.render.FitToPaperModes
All Implemented Interfaces:
Serializable, Comparable<FitToPaperModes>, java.lang.constant.Constable

public enum FitToPaperModes extends Enum<FitToPaperModes>
Behaviors when fitting HTML content to a physical paper size Can affect zoom level and css layout
  • Enum Constant Details

    • Zoom

      public static final FitToPaperModes Zoom
      Do nothing.
    • FixedPixelWidth

      public static final FitToPaperModes FixedPixelWidth
      Fit an exact number of pixels onto each PDF page. Useful when an optimal pixel width is known or printing documents to match a Chrome browser window display
    • Automatic

      public static final FitToPaperModes Automatic
      Measures minimum HTML content width after it is rendered by the browser and calculates zoom based on the width of the content. Useful when fitting a wide content or content of unknown width onto a PDF page
    • AutomaticFit

      public static final FitToPaperModes AutomaticFit
      Measures minimum HTML content width after it is rendered by the browser using the smallest view port possible Useful when fitting smaller content onto a wide page
    • ContinuousFeed

      public static final FitToPaperModes ContinuousFeed
      Creates a single page PDF which will force its entire content's width and height to fit into one page. Can be used for a consumer bill or receipt. Useful when printing bill or receipt
  • Method Details

    • values

      public static FitToPaperModes[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static FitToPaperModes valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null