Class ImageOptions

java.lang.Object
io.keikai.axyra.sheets.io.ImageOptions

public final class ImageOptions extends Object
Options for sheet / range image export (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.

  • Method Details

    • builder

      public static ImageOptions.Builder builder()
    • toBuilder

      public ImageOptions.Builder toBuilder()
      A builder pre-loaded with this value, for read–modify–write.
    • fontDirs

      public List<String> 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

      public Integer targetWidthPx()
      Exact output width in pixels (aspect kept), or null to use scale().
    • gridLines

      public Boolean gridLines()
      Gridline override: TRUE/FALSE force gridlines on/off; null uses the sheet's own print-gridlines flag.
    • page

      public Integer page()
      Which printed page renders (1-based over the sheet's print pagination, the PDF page numbering), or null for page 1.