public abstract class PaginatedSaveOptions extends SaveOptions
| Constructor and Description |
|---|
PaginatedSaveOptions() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllColumnsInOnePagePerSheet()
If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result.
|
boolean |
getCheckFontCompatibility()
Indicates whether to check font compatibility for every character in text.
|
boolean |
getCheckWorkbookDefaultFont()
When characters in the Excel are Unicode and not be set with correct font in cell style,
They may appear as block in pdf,image.
|
CustomRenderSettings |
getCustomRenderSettings()
Gets custom settings during rendering.
|
int |
getDefaultEditLanguage()
Gets default edit language.
|
java.lang.String |
getDefaultFont()
When characters in the Excel are Unicode and not be set with correct font in cell style,
They may appear as block in pdf,image.
|
DrawObjectEventHandler |
getDrawObjectEventHandler()
Implements this interface to get DrawObject and Bound when rendering.
|
int |
getEmfRenderSetting()
Setting for rendering Emf metafile.
|
Color |
getGridlineColor()
Gets gridline color.
|
int |
getGridlineType()
Gets gridline type.
|
boolean |
getIgnoreError()
Indicates if you need to hide the error while rendering.
|
boolean |
getOnePagePerSheet()
If OnePagePerSheet is true , all content of one sheet will output to only one page in result.
|
boolean |
getOutputBlankPageWhenNothingToPrint()
Indicates whether to output a blank page when there is nothing to print.
|
int |
getPageCount()
Gets the number of pages to save.
|
int |
getPageIndex()
Gets the 0-based index of the first page to save.
|
IPageSavingCallback |
getPageSavingCallback()
Control/Indicate progress of page saving process.
|
int |
getPrintingPageType()
Indicates which pages will not be printed.
|
SheetSet |
getSheetSet()
Gets the sheets to render.
|
int |
getTextCrossType()
Gets displaying text type when the text width is larger than cell width.
|
boolean |
isFontSubstitutionCharGranularity()
Indicates whether to only substitute the font of character when the cell font is not compatibility for it.
|
void |
setAllColumnsInOnePagePerSheet(boolean value)
If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result.
|
void |
setCheckFontCompatibility(boolean value)
Indicates whether to check font compatibility for every character in text.
|
void |
setCheckWorkbookDefaultFont(boolean value)
When characters in the Excel are Unicode and not be set with correct font in cell style,
They may appear as block in pdf,image.
|
void |
setCustomRenderSettings(CustomRenderSettings value)
Sets custom settings during rendering.
|
void |
setDefaultEditLanguage(int value)
Sets default edit language.
|
void |
setDefaultFont(java.lang.String value)
When characters in the Excel are Unicode and not be set with correct font in cell style,
They may appear as block in pdf,image.
|
void |
setDrawObjectEventHandler(DrawObjectEventHandler value)
Implements this interface to get DrawObject and Bound when rendering.
|
void |
setEmfRenderSetting(int value)
Setting for rendering Emf metafile.
|
void |
setFontSubstitutionCharGranularity(boolean value)
Indicates whether to only substitute the font of character when the cell font is not compatibility for it.
|
void |
setGridlineColor(Color value)
Sets gridline color.
|
void |
setGridlineType(int value)
Sets gridline type.
|
void |
setIgnoreError(boolean value)
Indicates if you need to hide the error while rendering.
|
void |
setOnePagePerSheet(boolean value)
If OnePagePerSheet is true , all content of one sheet will output to only one page in result.
|
void |
setOutputBlankPageWhenNothingToPrint(boolean value)
Indicates whether to output a blank page when there is nothing to print.
|
void |
setPageCount(int value)
Sets the number of pages to save.
|
void |
setPageIndex(int value)
Sets the 0-based index of the first page to save.
|
void |
setPageSavingCallback(IPageSavingCallback value)
Control/Indicate progress of page saving process.
|
void |
setPrintingPageType(int value)
Indicates which pages will not be printed.
|
void |
setSheetSet(SheetSet value)
Sets the sheets to render.
|
void |
setTextCrossType(int value)
Sets displaying text type when the text width is larger than cell width.
|
getCachedFileFolder, getCheckExcelRestriction, getClearData, getCreateDirectory, getEncryptDocumentProperties, getMergeAreas, getRefreshChartCache, getSaveFormat, getSortExternalNames, getSortNames, getUpdateSmartArt, getValidateMergedAreas, getWarningCallback, setCachedFileFolder, setCheckExcelRestriction, setClearData, setCreateDirectory, setEncryptDocumentProperties, setMergeAreas, setRefreshChartCache, setSortExternalNames, setSortNames, setUpdateSmartArt, setValidateMergedAreas, setWarningCallbackpublic java.lang.String getDefaultFont()
public void setDefaultFont(java.lang.String value)
public boolean getCheckWorkbookDefaultFont()
Remarks
Default is true.public void setCheckWorkbookDefaultFont(boolean value)
Remarks
Default is true.public boolean getCheckFontCompatibility()
Remarks
The default value is true. Disable this property may give better performance. But when the default or specified font of text/character cannot be used to render it, unreadable characters(such as block) maybe occur in the generated pdf. For such situation user should keep this property as true so that alternative font can be searched and used to render the text instead;public void setCheckFontCompatibility(boolean value)
Remarks
The default value is true. Disable this property may give better performance. But when the default or specified font of text/character cannot be used to render it, unreadable characters(such as block) maybe occur in the generated pdf. For such situation user should keep this property as true so that alternative font can be searched and used to render the text instead;public boolean isFontSubstitutionCharGranularity()
Remarks
Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first.public void setFontSubstitutionCharGranularity(boolean value)
Remarks
Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first.public boolean getOnePagePerSheet()
public void setOnePagePerSheet(boolean value)
public boolean getAllColumnsInOnePagePerSheet()
public void setAllColumnsInOnePagePerSheet(boolean value)
public boolean getIgnoreError()
public void setIgnoreError(boolean value)
public boolean getOutputBlankPageWhenNothingToPrint()
Remarks
Default is true.public void setOutputBlankPageWhenNothingToPrint(boolean value)
Remarks
Default is true.public int getPageIndex()
Remarks
Default is 0.Example
The following example shows how to render a range of pages (3 and 4) in a Microsoft Excel file to PDF.
//Open an Excel file
Workbook wb = new Workbook("Book1.xlsx");
PdfSaveOptions options = new PdfSaveOptions();
//Print only Page 3 and Page 4 in the output PDF
//Starting page index (0-based index)
options.setPageIndex(3);
//Number of pages to be printed
options.setPageCount(2);
//Save the PDF file
wb.save("output.pdf", options);
public void setPageIndex(int value)
Remarks
Default is 0.public int getPageCount()
Remarks
Default is System.Int32.MaxValue which means all pages will be rendered..Example
The following example shows how to render a range of pages (3 and 4) in a Microsoft Excel file to PDF.
//Open an Excel file
Workbook wb = new Workbook("Book1.xlsx");
PdfSaveOptions options = new PdfSaveOptions();
//Print only Page 3 and Page 4 in the output PDF
//Starting page index (0-based index)
options.setPageIndex(3);
//Number of pages to be printed
options.setPageCount(2);
//Save the PDF file
wb.save("output.pdf", options);
public void setPageCount(int value)
Remarks
Default is System.Int32.MaxValue which means all pages will be rendered..public int getPrintingPageType()
See PrintingPageType.
Remarks
If content in the sheet is sparse, there will be some pages are totally blank in the output pdf file. If you don't want these blank pages, you can use this option to omit them.Example
The following code omits blank pages or pages which only contains some style content like cell background, borders.
Workbook wb = new Workbook("Book1.xlsx");
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
//ignore blank pages
pdfSaveOptions.setPrintingPageType(PrintingPageType.IGNORE_BLANK);
wb.save("output_ignore_blank_page.pdf", pdfSaveOptions);
//ignore blank pages and pages which only contains some style content like cell background
pdfSaveOptions.setPrintingPageType(PrintingPageType.IGNORE_STYLE);
wb.save("output_ignore_blank_and_style_page.pdf", pdfSaveOptions);
public void setPrintingPageType(int value)
See PrintingPageType.
Remarks
If content in the sheet is sparse, there will be some pages are totally blank in the output pdf file. If you don't want these blank pages, you can use this option to omit them.public int getGridlineType()
See GridlineType.
Remarks
Default is Dotted type.public void setGridlineType(int value)
See GridlineType.
Remarks
Default is Dotted type.public Color getGridlineColor()
Remarks
It will ignore the gridline color settings in the source file.public void setGridlineColor(Color value)
Remarks
It will ignore the gridline color settings in the source file.public int getTextCrossType()
See TextCrossType.
public void setTextCrossType(int value)
See TextCrossType.
public int getDefaultEditLanguage()
See DefaultEditLanguage.
Remarks
It may display/render different layouts for text paragraph when different edit languages is set. Default isDefaultEditLanguage.AUTO.public void setDefaultEditLanguage(int value)
See DefaultEditLanguage.
Remarks
It may display/render different layouts for text paragraph when different edit languages is set. Default isDefaultEditLanguage.AUTO.public SheetSet getSheetSet()
SheetSet.getVisible().
Example
The following code only renders active sheet to pdf.
Workbook workbook = new Workbook("Book1.xlsx");
int activeSheetIndex = workbook.getWorksheets().getActiveSheetIndex();
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
//set active sheet index to sheet set.
pdfSaveOptions.setSheetSet(new SheetSet(new int[] { activeSheetIndex }));
workbook.save("output.pdf", pdfSaveOptions);
public void setSheetSet(SheetSet value)
SheetSet.getVisible().public DrawObjectEventHandler getDrawObjectEventHandler()
public void setDrawObjectEventHandler(DrawObjectEventHandler value)
public IPageSavingCallback getPageSavingCallback()
public void setPageSavingCallback(IPageSavingCallback value)
public int getEmfRenderSetting()
See EmfRenderSetting.
Remarks
EMF metafiles identified as "EMF+ Dual" can contain both EMF+ records and EMF records. Either type of record can be used to render the image, only EMF+ records, or only EMF records. WhenEmfRenderSetting.EMF_PLUS_PREFER is set, then EMF+ records will be parsed while rendering to page, otherwise only EMF records will be parsed.
Default value is EmfRenderSetting.EMF_ONLY.public void setEmfRenderSetting(int value)
See EmfRenderSetting.
Remarks
EMF metafiles identified as "EMF+ Dual" can contain both EMF+ records and EMF records. Either type of record can be used to render the image, only EMF+ records, or only EMF records. WhenEmfRenderSetting.EMF_PLUS_PREFER is set, then EMF+ records will be parsed while rendering to page, otherwise only EMF records will be parsed.
Default value is EmfRenderSetting.EMF_ONLY.public CustomRenderSettings getCustomRenderSettings()
public void setCustomRenderSettings(CustomRenderSettings value)
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.