Class PdfOptions.Builder

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

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

    • title

      public PdfOptions.Builder title(String title)
    • author

      public PdfOptions.Builder author(String author)
    • pageRange

      public PdfOptions.Builder pageRange(String pageRange)
      1-based page selection over the final document, e.g. "2-5,8".
    • sheets

      public PdfOptions.Builder sheets(int... sheets)
      Sheet indices to export (0-based; hidden sheets included when listed).
    • sheetNames

      public PdfOptions.Builder sheetNames(String... names)
      Sheet names to export (case-sensitive; unknown names fail).
    • fitTo

      public PdfOptions.Builder fitTo(PdfOptions.Fit fit)
      Fit-to-page override for every selected sheet.
    • userPassword

      public PdfOptions.Builder userPassword(String password)
      Password required to open the document (enables encryption).
    • ownerPassword

      public PdfOptions.Builder ownerPassword(String password)
      Password granting full access (enables encryption).
    • allowPrint

      public PdfOptions.Builder allowPrint(boolean allow)
      Permit printing (default true; encryption only).
    • allowCopy

      public PdfOptions.Builder allowCopy(boolean allow)
      Permit content copy / extraction (default true; encryption only).
    • allowModify

      public PdfOptions.Builder allowModify(boolean allow)
      Permit document modification (default true; encryption only).
    • watermark

      public PdfOptions.Builder watermark(String text)
      Paint text as a diagonal light-gray watermark under every page's content (e.g. "CONFIDENTIAL", "DRAFT").
    • bookmarks

      public PdfOptions.Builder bookmarks(boolean on)
      Emit a PDF outline (bookmarks): one entry per exported sheet, targeting the sheet's first page — combined with pageRange(String), dropped sheets lose their bookmark and targets follow the renumbered pages.
    • fontDirs

      public PdfOptions.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 PdfOptions.Builder addFontDir(String dir)
      Adds one directory to fontDirs(List).
    • pdfA

      public PdfOptions.Builder pdfA(boolean on)
    • build

      public PdfOptions build()