Class OfficeSpreadsheetConverterProperties

java.lang.Object
com.itextpdf.pdfoffice.AbstractOfficeConverterProperties
com.itextpdf.pdfoffice.OfficeSpreadsheetConverterProperties

public class OfficeSpreadsheetConverterProperties extends AbstractOfficeConverterProperties
A class that keeps conversion properties specific for office sheets.
  • Constructor Details

  • Method Details

    • getMaxPagesToFitRows

      public Integer getMaxPagesToFitRows()
      Gets number of pages to fit to in height.

      If stored value is more than the actual number of pages in spreadsheet document, than the value is ignored and scale is not applied.

      Returns:
      number of pages to fit or null if property wasn't set
    • setMaxPagesToFitRows

      public OfficeSpreadsheetConverterProperties setMaxPagesToFitRows (Integer maxPagesToFitRows)
      Sets the maximal number of pages which the sheet can occupy vertically. If the set number of pages is not enough, then the sheet will be scaled to fit it. If the set number of pages is greater than needed or null, then this property will be ignored and the sheet will not be scaled.

      Any positive number is allowed, if zero/negative value is passed, then the PdfOfficeException is thrown.

      Parameters:
      maxPagesToFitRows - number of pages to fit or null to disable scale
      Returns:
      this OfficeSpreadsheetConverterProperties instance
      Throws:
      PdfOfficeException - if negative value is passed
    • getMaxPagesToFitColumns

      public Integer getMaxPagesToFitColumns()
      Gets number of pages to fit to in width.

      If stored value is more than the actual number of pages in spreadsheet document, than the value is ignored and scale is not applied.

      Returns:
      number of pages to fit or null if property wasn't set
    • setMaxPagesToFitColumns

      public OfficeSpreadsheetConverterProperties setMaxPagesToFitColumns (Integer maxPagesToFitColumns)
      Sets the maximal number of pages which the sheet can occupy horizontally. If the set number of pages is not enough, then the sheet will be scaled to fit it. If the set number of pages is greater than needed or null, then this property will be ignored and the sheet will not be scaled.

      Any positive number is allowed, if zero/negative value is passed, then the PdfOfficeException is thrown.

      Parameters:
      maxPagesToFitColumns - number of pages to fit or null to disable scale
      Returns:
      this OfficeSpreadsheetConverterProperties instance
      Throws:
      PdfOfficeException - if negative value is passed
    • isIgnorePrintArea

      public boolean isIgnorePrintArea()
      Gets the spreadsheet ignore print area setting.

      The default value is false.

      Returns:
      true, if print area will be ignored, false - otherwise
    • setIgnorePrintArea

      public OfficeSpreadsheetConverterProperties setIgnorePrintArea (boolean ignorePrintArea)
      Defines whether all the sheet's content, including content outside print area, should be converted.

      The default value is false.

      Parameters:
      ignorePrintArea - if true, print area will be ignored, if false - respected
      Returns:
      this OfficeSpreadsheetConverterProperties instance
    • getSheetSelector

      public SheetSelector getSheetSelector()
      Gets the selector of the workbook sheets which will be rendered.
      Returns:
      the sheet selector of the workbook pages which will be rendered
    • setSheetSelector

      public OfficeSpreadsheetConverterProperties setSheetSelector (SheetSelector sheetSelector)
      Defines the selector of the workbook sheets which will be rendered.
      Parameters:
      sheetSelector - the sheet selector of the workbook pages which will be rendered
      Returns:
      this OfficeSpreadsheetConverterProperties instance