Class ImageOptions.Builder

java.lang.Object
io.keikai.axyra.sheets.io.ImageOptions.Builder
Enclosing class:
ImageOptions

public static final class ImageOptions.Builder extends Object
  • Method Details

    • scale

      public ImageOptions.Builder scale(double scale)
      Zoom over the 96-DPI base (1.0 = 96 DPI, 2.0 = 192 DPI).
    • targetWidthPx

      public ImageOptions.Builder targetWidthPx(int widthPx)
      Exact output width in pixels; the height keeps the page aspect ratio.
    • gridLines

      public ImageOptions.Builder gridLines(boolean show)
      Force gridlines on or off (default: the sheet's print-gridlines flag).
    • page

      public ImageOptions.Builder page(int page)
      Render the given printed page (1-based over the sheet's print pagination — the same numbering the PDF export uses). Default: page 1. Rendering a page past the sheet's page count fails; use Renderer.pageCount to enumerate.
    • fontDirs

      public ImageOptions.Builder fontDirs(List<String> dirs)
      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.

    • addFontDir

      public ImageOptions.Builder addFontDir(String dir)
      Adds one directory to fontDirs(java.util.List).
    • build

      public ImageOptions build()