Package com.ironsoftware.ironpdf.render
Enum FitToPaperModes
- All Implemented Interfaces:
Serializable
,Comparable<FitToPaperModes>
,java.lang.constant.Constable
Behaviors when fitting HTML content to a physical paper size
Can affect zoom level and css layout
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionMeasures minimum HTML content width after it is rendered by the browser and calculatesChromePdfRenderOptions.setZoom(int)
based on the width of the content.Measures minimum HTML content width after it is rendered by the browser using the smallest view port possible, and calculatesChromePdfRenderOptions.setZoom(int)
based on the width of the content.Fit an exact number of pixels onto each PDF page.Do nothing. -
Method Summary
Modifier and TypeMethodDescriptionstatic FitToPaperModes
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 Details
-
None
Do nothing. Default Chrome PDF printing behavior. UsesChromePdfRenderOptions.setZoom(int)
to specify zoom level.ChromePdfRenderOptions.setViewPortWidth(int)
has no effect. Instead, Chrome will automatically set the view port based onChromePdfRenderOptions.setPaperSize(PaperSize)
. UseChromePdfRenderOptions.setCssMediaType(CssMediaType)
to specify CSS media style.Useful when using 'print' CSS media style or printing documents to match the Chrome browser print preview.
-
FixedPixelWidth
Fit an exact number of pixels onto each PDF page. UsesChromePdfRenderOptions.setViewPortWidth(int)
to specify the pixel width to fit on each PDF page.ChromePdfRenderOptions.setZoom(int)
has no effect. Instead, IronPdf will calculate the zoom level based onChromePdfRenderOptions.setViewPortWidth(int)
andChromePdfRenderOptions.setPaperSize(PaperSize)
Useful when an optimal pixel width is known or printing documents to match a Chrome browser window display
-
Automatic
Measures minimum HTML content width after it is rendered by the browser and calculatesChromePdfRenderOptions.setZoom(int)
based on the width of the content.ChromePdfRenderOptions.setZoom(int)
andChromePdfRenderOptions.setViewPortWidth(int)
have no effect and are calculated automatically by IronPdf.Useful when fitting a wide content or content of unknown width onto a PDF page
-
AutomaticFit
Measures minimum HTML content width after it is rendered by the browser using the smallest view port possible, and calculatesChromePdfRenderOptions.setZoom(int)
based on the width of the content. UseChromePdfRenderOptions.setViewPortWidth(int)
to specify the minimum number of pixels to be fit on each PDF page.ChromePdfRenderOptions.setZoom(int)
has no effect and is calculated automatically by IronPdf.Useful when fitting smaller content onto a wide page
-
-
Method Details
-
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
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
-