Class ImageOptions
Renderer.toPng /
Renderer.toSvg).
Wide options type — construct through the ImageOptions.Builder
(ImageOptions.builder()…build()); toBuilder() supports
read–modify–write.
The image is one page of the sheet's print layout (page setup,
print area and print titles all honored) — page 1 by default, or the page
selected with ImageOptions.Builder.page(int); enumerate with
Renderer.pageCount. PNG output uses a 96-DPI base
(1 pt = 4/3 px), so an A4 portrait sheet is 794 px wide at
scale = 1.0.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageOptions.Builderbuilder()fontDirs()Extra directories scanned for fonts, on top of the host's own font paths.Gridline override:TRUE/FALSEforce gridlines on/off;nulluses the sheet's own print-gridlines flag.page()Which printed page renders (1-based over the sheet's print pagination, the PDF page numbering), ornullfor page 1.doublescale()Zoom over the 96-DPI base (1.0 = 96 DPI).Exact output width in pixels (aspect kept), ornullto usescale().A builder pre-loaded with this value, for read–modify–write.
-
Method Details
-
builder
-
toBuilder
A builder pre-loaded with this value, for read–modify–write. -
fontDirs
Extra directories scanned for fonts, on top of the host's own font paths.A workbook whose fonts are not installed on the rendering machine is drawn with substituted glyphs — every advance width changes, so text wraps and clips differently from the original. Pointing the renderer at the directory holding those font files is what makes the output match. Directories that do not exist are skipped rather than failing the render.
-
scale
public double scale()Zoom over the 96-DPI base (1.0 = 96 DPI). Ignored when a target width is set. -
targetWidthPx
Exact output width in pixels (aspect kept), ornullto usescale(). -
gridLines
Gridline override:TRUE/FALSEforce gridlines on/off;nulluses the sheet's own print-gridlines flag. -
page
Which printed page renders (1-based over the sheet's print pagination, the PDF page numbering), ornullfor page 1.
-