public enum FitToPaperModes extends Enum<FitToPaperModes>
Enum Constant and Description |
---|
Automatic
Measures minimum HTML content width after it is rendered by the browser and calculates
ChromePdfRenderOptions.setZoom(int)
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, and calculates
ChromePdfRenderOptions.setZoom(int) based on the width of the content. |
FixedPixelWidth
Fit an exact number of pixels onto each PDF page.
|
Zoom
Do nothing.
|
Modifier and Type | Method and 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.
|
public static final FitToPaperModes Zoom
ChromePdfRenderOptions.setZoom(int)
to specify zoom level.
ChromePdfRenderOptions.setViewPortWidth(int)
has no effect.
Instead, Chrome will automatically set the view port based on ChromePdfRenderOptions.setPaperSize(PaperSize)
.
Use ChromePdfRenderOptions.setCssMediaType(CssMediaType)
to specify CSS media style.
Useful when using 'print' CSS media style or printing documents to match the Chrome browser print preview.
public static final FitToPaperModes FixedPixelWidth
ChromePdfRenderOptions.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 on
ChromePdfRenderOptions.setViewPortWidth(int)
and ChromePdfRenderOptions.setPaperSize(PaperSize)
Useful when an optimal pixel width is known or printing documents to match a Chrome browser window display
public static final FitToPaperModes Automatic
ChromePdfRenderOptions.setZoom(int)
based on the width of the content.
ChromePdfRenderOptions.setZoom(int)
and ChromePdfRenderOptions.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
public static final FitToPaperModes AutomaticFit
ChromePdfRenderOptions.setZoom(int)
based on the width of the content.
Use ChromePdfRenderOptions.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
public static FitToPaperModes[] values()
for (FitToPaperModes c : FitToPaperModes.values()) System.out.println(c);
public static FitToPaperModes valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2022–2023 Iron Software. All rights reserved.