Package com.itextpdf.pdfoffice
Class OfficeSpreadsheetConverterProperties
java.lang.Object
com.itextpdf.pdfoffice.AbstractOfficeConverterProperties
com.itextpdf.pdfoffice.OfficeSpreadsheetConverterProperties
A class that keeps conversion properties specific for office sheets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets number of pages to fit to in width.Gets number of pages to fit to in height.Gets the selector of the workbook sheets which will be rendered.boolean
Gets the spreadsheet ignore print area setting.setIgnorePrintArea
(boolean ignorePrintArea) Defines whether all the sheet's content, including content outside print area, should be converted.setMaxPagesToFitColumns
(Integer maxPagesToFitColumns) Sets the maximal number of pages which the sheet can occupy horizontally.setMaxPagesToFitRows
(Integer maxPagesToFitRows) Sets the maximal number of pages which the sheet can occupy vertically.setSheetSelector
(SheetSelector sheetSelector) Defines the selector of the workbook sheets which will be rendered.Methods inherited from class com.itextpdf.pdfoffice.AbstractOfficeConverterProperties
getThreadWaitingTimeLimit, setEventMetaInfo, setThreadWaitingTimeLimit
-
Constructor Details
-
OfficeSpreadsheetConverterProperties
public OfficeSpreadsheetConverterProperties()CreatesOfficeSpreadsheetConverterProperties
instance.
-
-
Method Details
-
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
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
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
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
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
Gets the selector of the workbook sheets which will be rendered.- Returns:
- the sheet selector of the workbook pages which will be rendered
-
setSheetSelector
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
-