Package com.ironsoftware.ironpdf.render
Enum FitToPaperModes
- java.lang.Object
-
- java.lang.Enum<FitToPaperModes>
-
- com.ironsoftware.ironpdf.render.FitToPaperModes
-
- All Implemented Interfaces:
Serializable
,Comparable<FitToPaperModes>
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 Summary
Enum Constants Enum Constant Description Automatic
Measures minimum HTML content width after it is rendered by the browser and calculates zoom based on the width of the content.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 pageContinuousFeed
Creates a single page PDF which will force its entire content's width and height to fit into one page.FixedPixelWidth
Fit an exact number of pixels onto each PDF page.Zoom
Do nothing.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FitToPaperModes
valueOf(String name)
Returns the enum constant of this type with the specified name.static FitToPaperModes[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static FitToPaperModes[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FitToPaperModes c : FitToPaperModes.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
-