com.aspose.cells
Class XpsSaveOptions

java.lang.Object
  extended by SaveOptions
      extended by PaginatedSaveOptions
          extended by com.aspose.cells.XpsSaveOptions

public class XpsSaveOptions 
extends PaginatedSaveOptions

Represents the additional options when saving the file as the Xps.


Constructor Summary
XpsSaveOptions()
           Creates options for saving xps file.
XpsSaveOptions(int saveFormat)
           Creates options for saving xps file.
 
Property Getters/Setters Summary
booleangetAllColumnsInOnePagePerSheet()→ inherited from PaginatedSaveOptions
voidsetAllColumnsInOnePagePerSheet(boolean)
           If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result. The width of paper size of pagesetup will be ignored, and the other settings of pagesetup will still take effect.
java.lang.StringgetCachedFileFolder()→ inherited from SaveOptions
voidsetCachedFileFolder(java.lang.String)
           The cached file folder is used to store some large data.
booleangetCheckFontCompatibility()→ inherited from PaginatedSaveOptions
voidsetCheckFontCompatibility(boolean)
           Indicates whether to check font compatibility for every character in text.
booleangetCheckWorkbookDefaultFont()→ inherited from PaginatedSaveOptions
voidsetCheckWorkbookDefaultFont(boolean)
           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. Set this to true to try to use workbook's default font to show these characters first.
booleangetClearData()→ inherited from SaveOptions
voidsetClearData(boolean)
           Make the workbook empty after saving the file.
booleangetCreateDirectory()→ inherited from SaveOptions
voidsetCreateDirectory(boolean)
           If true and the directory does not exist, the directory will be automatically created before saving the file.
intgetDefaultEditLanguage()→ inherited from PaginatedSaveOptions
voidsetDefaultEditLanguage(int)
           Gets or sets default edit language. The value of the property is DefaultEditLanguage integer constant.
java.lang.StringgetDefaultFont()→ inherited from PaginatedSaveOptions
voidsetDefaultFont(java.lang.String)
           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. Set the DefaultFont such as MingLiu or MS Gothic to show these characters. If this property is not set, Aspose.Cells will use system default font to show these unicode characters.
DrawObjectEventHandlergetDrawObjectEventHandler()→ inherited from PaginatedSaveOptions
voidsetDrawObjectEventHandler(DrawObjectEventHandler)
           Implements this interface to get DrawObject and Bound when rendering.
intgetGridlineType()→ inherited from PaginatedSaveOptions
voidsetGridlineType(int)
           Gets or sets gridline type. The value of the property is GridlineType integer constant.
booleangetIgnoreError()→ inherited from PaginatedSaveOptions
voidsetIgnoreError(boolean)
           Indicates if you need to hide the error while rendering. The error can be error in shape, image, chart rendering, etc.
booleanisFontSubstitutionCharGranularity()→ inherited from PaginatedSaveOptions
voidsetFontSubstitutionCharGranularity(boolean)
           Indicates whether to only substitute the font of character when the cell font is not compatibility for it.
booleangetMergeAreas()→ inherited from SaveOptions
voidsetMergeAreas(boolean)
           Indicates whether merge the areas of conditional formatting and validation before saving the file.
booleangetOnePagePerSheet()→ inherited from PaginatedSaveOptions
voidsetOnePagePerSheet(boolean)
           If OnePagePerSheet is true , all content of one sheet will output to only one page in result. The paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect.
booleangetOutputBlankPageWhenNothingToPrint()→ inherited from PaginatedSaveOptions
voidsetOutputBlankPageWhenNothingToPrint(boolean)
           Indicates whether to output a blank page when there is nothing to print.
intgetPageCount()→ inherited from PaginatedSaveOptions
voidsetPageCount(int)
           Gets or sets the number of pages to save.
intgetPageIndex()→ inherited from PaginatedSaveOptions
voidsetPageIndex(int)
           Gets or sets the 0-based index of the first page to save.
IPageSavingCallbackgetPageSavingCallback()→ inherited from PaginatedSaveOptions
voidsetPageSavingCallback(IPageSavingCallback)
           Control/Indicate progress of page saving process.
intgetPrintingPageType()→ inherited from PaginatedSaveOptions
voidsetPrintingPageType(int)
           Indicates which pages will not be printed. The value of the property is PrintingPageType integer constant.
booleangetRefreshChartCache()→ inherited from SaveOptions
voidsetRefreshChartCache(boolean)
           Indicates whether refreshing chart cache data
intgetSaveFormat()→ inherited from SaveOptions
           Gets the save file format. The value of the property is SaveFormat integer constant.
SheetSetgetSheetSet()→ inherited from PaginatedSaveOptions
voidsetSheetSet(SheetSet)
           Gets or sets the sheets to render. Default is all visible sheets in the workbook: SheetSet.Visible.
booleangetSortExternalNames()→ inherited from SaveOptions
voidsetSortExternalNames(boolean)
           Indicates whether sorting external defined names before saving file.
booleangetSortNames()→ inherited from SaveOptions
voidsetSortNames(boolean)
           Indicates whether sorting defined names before saving file.
intgetTextCrossType()→ inherited from PaginatedSaveOptions
voidsetTextCrossType(int)
           Gets or sets displaying text type when the text width is larger than cell width. The value of the property is TextCrossType integer constant.
booleangetUpdateSmartArt()→ inherited from SaveOptions
voidsetUpdateSmartArt(boolean)
           Indicates whether updating smart art setting. The default value is false.
booleangetValidateMergedAreas()→ inherited from SaveOptions
voidsetValidateMergedAreas(boolean)
           Indicates whether validate merged cells before saving the file.
IWarningCallbackgetWarningCallback()→ inherited from SaveOptions
voidsetWarningCallback(IWarningCallback)
           Gets or sets warning callback.
 

Constructor Detail

XpsSaveOptions

public XpsSaveOptions()
Creates options for saving xps file.

XpsSaveOptions

public XpsSaveOptions(int saveFormat)
Creates options for saving xps file. NOTE: This constructor is now obsolete. Instead, please use XpsSaveOptions() constructor. This property will be removed 12 months later since August 2022. Aspose apologizes for any inconvenience you may have experienced.
Parameters:
saveFormat - A SaveFormat value. The save format, it must be xps format.

Property Getters/Setters Detail

getDefaultFont/setDefaultFont

→ inherited from PaginatedSaveOptions
public java.lang.String getDefaultFont() / public 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. Set the DefaultFont such as MingLiu or MS Gothic to show these characters. If this property is not set, Aspose.Cells will use system default font to show these unicode characters.

setDefaultFont

→ inherited from PaginatedSaveOptions
public 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. Set the DefaultFont such as MingLiu or MS Gothic to show these characters. If this property is not set, Aspose.Cells will use system default font to show these unicode characters.

getCheckWorkbookDefaultFont/setCheckWorkbookDefaultFont

→ inherited from PaginatedSaveOptions
public boolean getCheckWorkbookDefaultFont() / public 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. Set this to true to try to use workbook's default font to show these characters first. Default is true.

setCheckWorkbookDefaultFont

→ inherited from PaginatedSaveOptions
public 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. Set this to true to try to use workbook's default font to show these characters first. Default is true.

getCheckFontCompatibility/setCheckFontCompatibility

→ inherited from PaginatedSaveOptions
public boolean getCheckFontCompatibility() / public void setCheckFontCompatibility(boolean value)
Indicates whether to check font compatibility for every character in text. 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;

setCheckFontCompatibility

→ inherited from PaginatedSaveOptions
public void setCheckFontCompatibility(boolean value)
Indicates whether to check font compatibility for every character in text. 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;

isFontSubstitutionCharGranularity/setFontSubstitutionCharGranularity

→ inherited from PaginatedSaveOptions
public boolean isFontSubstitutionCharGranularity() / public void setFontSubstitutionCharGranularity(boolean value)
Indicates whether to only substitute the font of character when the cell font is not compatibility for it. Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first.

setFontSubstitutionCharGranularity

→ inherited from PaginatedSaveOptions
public void setFontSubstitutionCharGranularity(boolean value)
Indicates whether to only substitute the font of character when the cell font is not compatibility for it. Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first.

getOnePagePerSheet/setOnePagePerSheet

→ inherited from PaginatedSaveOptions
public boolean getOnePagePerSheet() / public void setOnePagePerSheet(boolean value)
If OnePagePerSheet is true , all content of one sheet will output to only one page in result. The paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect.

setOnePagePerSheet

→ inherited from PaginatedSaveOptions
public void setOnePagePerSheet(boolean value)
If OnePagePerSheet is true , all content of one sheet will output to only one page in result. The paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect.

getAllColumnsInOnePagePerSheet/setAllColumnsInOnePagePerSheet

→ inherited from PaginatedSaveOptions
public boolean getAllColumnsInOnePagePerSheet() / public void setAllColumnsInOnePagePerSheet(boolean value)
If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result. The width of paper size of pagesetup will be ignored, and the other settings of pagesetup will still take effect.

setAllColumnsInOnePagePerSheet

→ inherited from PaginatedSaveOptions
public void setAllColumnsInOnePagePerSheet(boolean value)
If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result. The width of paper size of pagesetup will be ignored, and the other settings of pagesetup will still take effect.

getIgnoreError/setIgnoreError

→ inherited from PaginatedSaveOptions
public boolean getIgnoreError() / public void setIgnoreError(boolean value)
Indicates if you need to hide the error while rendering. The error can be error in shape, image, chart rendering, etc.

setIgnoreError

→ inherited from PaginatedSaveOptions
public void setIgnoreError(boolean value)
Indicates if you need to hide the error while rendering. The error can be error in shape, image, chart rendering, etc.

getOutputBlankPageWhenNothingToPrint/setOutputBlankPageWhenNothingToPrint

→ inherited from PaginatedSaveOptions
public boolean getOutputBlankPageWhenNothingToPrint() / public void setOutputBlankPageWhenNothingToPrint(boolean value)
Indicates whether to output a blank page when there is nothing to print. Default is true.

setOutputBlankPageWhenNothingToPrint

→ inherited from PaginatedSaveOptions
public void setOutputBlankPageWhenNothingToPrint(boolean value)
Indicates whether to output a blank page when there is nothing to print. Default is true.

getPageIndex/setPageIndex

→ inherited from PaginatedSaveOptions
public int getPageIndex() / public void setPageIndex(int value)
Gets or sets the 0-based index of the first page to save. Default is 0.

setPageIndex

→ inherited from PaginatedSaveOptions
public void setPageIndex(int value)
Gets or sets the 0-based index of the first page to save. Default is 0.

getPageCount/setPageCount

→ inherited from PaginatedSaveOptions
public int getPageCount() / public void setPageCount(int value)
Gets or sets the number of pages to save. Default is System.Int32.MaxValue which means all pages will be rendered..

Example:

//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);

setPageCount

→ inherited from PaginatedSaveOptions
public void setPageCount(int value)
Gets or sets the number of pages to save. Default is System.Int32.MaxValue which means all pages will be rendered..

Example:

//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);

getPrintingPageType/setPrintingPageType

→ inherited from PaginatedSaveOptions
public int getPrintingPageType() / public void setPrintingPageType(int value)
Indicates which pages will not be printed. The value of the property is PrintingPageType integer constant. 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:

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);

setPrintingPageType

→ inherited from PaginatedSaveOptions
public void setPrintingPageType(int value)
Indicates which pages will not be printed. The value of the property is PrintingPageType integer constant. 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:

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);

getGridlineType/setGridlineType

→ inherited from PaginatedSaveOptions
public int getGridlineType() / public void setGridlineType(int value)
Gets or sets gridline type. The value of the property is GridlineType integer constant. Default is Dotted type.

setGridlineType

→ inherited from PaginatedSaveOptions
public void setGridlineType(int value)
Gets or sets gridline type. The value of the property is GridlineType integer constant. Default is Dotted type.

getTextCrossType/setTextCrossType

→ inherited from PaginatedSaveOptions
public int getTextCrossType() / public void setTextCrossType(int value)
Gets or sets displaying text type when the text width is larger than cell width. The value of the property is TextCrossType integer constant.

setTextCrossType

→ inherited from PaginatedSaveOptions
public void setTextCrossType(int value)
Gets or sets displaying text type when the text width is larger than cell width. The value of the property is TextCrossType integer constant.

getDefaultEditLanguage/setDefaultEditLanguage

→ inherited from PaginatedSaveOptions
public int getDefaultEditLanguage() / public void setDefaultEditLanguage(int value)
Gets or sets default edit language. The value of the property is DefaultEditLanguage integer constant. It may display/render different layouts for text paragraph when different edit languages is set. Default is DefaultEditLanguage.AUTO.

setDefaultEditLanguage

→ inherited from PaginatedSaveOptions
public void setDefaultEditLanguage(int value)
Gets or sets default edit language. The value of the property is DefaultEditLanguage integer constant. It may display/render different layouts for text paragraph when different edit languages is set. Default is DefaultEditLanguage.AUTO.

getSheetSet/setSheetSet

→ inherited from PaginatedSaveOptions
public SheetSet getSheetSet() / public void setSheetSet(SheetSet value)
Gets or sets the sheets to render. Default is all visible sheets in the workbook: SheetSet.Visible.

setSheetSet

→ inherited from PaginatedSaveOptions
public void setSheetSet(SheetSet value)
Gets or sets the sheets to render. Default is all visible sheets in the workbook: SheetSet.Visible.

getDrawObjectEventHandler/setDrawObjectEventHandler

→ inherited from PaginatedSaveOptions
public DrawObjectEventHandler getDrawObjectEventHandler() / public void setDrawObjectEventHandler(DrawObjectEventHandler value)
Implements this interface to get DrawObject and Bound when rendering.

setDrawObjectEventHandler

→ inherited from PaginatedSaveOptions
public void setDrawObjectEventHandler(DrawObjectEventHandler value)
Implements this interface to get DrawObject and Bound when rendering.

getPageSavingCallback/setPageSavingCallback

→ inherited from PaginatedSaveOptions
public IPageSavingCallback getPageSavingCallback() / public void setPageSavingCallback(IPageSavingCallback value)
Control/Indicate progress of page saving process.

setPageSavingCallback

→ inherited from PaginatedSaveOptions
public void setPageSavingCallback(IPageSavingCallback value)
Control/Indicate progress of page saving process.

getSaveFormat

→ inherited from SaveOptions
public int getSaveFormat()
Gets the save file format. The value of the property is SaveFormat integer constant.

getClearData/setClearData

→ inherited from SaveOptions
public boolean getClearData() / public void setClearData(boolean value)
Make the workbook empty after saving the file.

setClearData

→ inherited from SaveOptions
public void setClearData(boolean value)
Make the workbook empty after saving the file.

getCachedFileFolder/setCachedFileFolder

→ inherited from SaveOptions
public java.lang.String getCachedFileFolder() / public void setCachedFileFolder(java.lang.String value)
The cached file folder is used to store some large data.

setCachedFileFolder

→ inherited from SaveOptions
public void setCachedFileFolder(java.lang.String value)
The cached file folder is used to store some large data.

getValidateMergedAreas/setValidateMergedAreas

→ inherited from SaveOptions
public boolean getValidateMergedAreas() / public void setValidateMergedAreas(boolean value)
Indicates whether validate merged cells before saving the file. The default value is false.

setValidateMergedAreas

→ inherited from SaveOptions
public void setValidateMergedAreas(boolean value)
Indicates whether validate merged cells before saving the file. The default value is false.

getMergeAreas/setMergeAreas

→ inherited from SaveOptions
public boolean getMergeAreas() / public void setMergeAreas(boolean value)
Indicates whether merge the areas of conditional formatting and validation before saving the file. The default value is false.

setMergeAreas

→ inherited from SaveOptions
public void setMergeAreas(boolean value)
Indicates whether merge the areas of conditional formatting and validation before saving the file. The default value is false.

getCreateDirectory/setCreateDirectory

→ inherited from SaveOptions
public boolean getCreateDirectory() / public void setCreateDirectory(boolean value)
If true and the directory does not exist, the directory will be automatically created before saving the file. The default value is false.

setCreateDirectory

→ inherited from SaveOptions
public void setCreateDirectory(boolean value)
If true and the directory does not exist, the directory will be automatically created before saving the file. The default value is false.

getSortNames/setSortNames

→ inherited from SaveOptions
public boolean getSortNames() / public void setSortNames(boolean value)
Indicates whether sorting defined names before saving file.

setSortNames

→ inherited from SaveOptions
public void setSortNames(boolean value)
Indicates whether sorting defined names before saving file.

getSortExternalNames/setSortExternalNames

→ inherited from SaveOptions
public boolean getSortExternalNames() / public void setSortExternalNames(boolean value)
Indicates whether sorting external defined names before saving file.

setSortExternalNames

→ inherited from SaveOptions
public void setSortExternalNames(boolean value)
Indicates whether sorting external defined names before saving file.

getRefreshChartCache/setRefreshChartCache

→ inherited from SaveOptions
public boolean getRefreshChartCache() / public void setRefreshChartCache(boolean value)
Indicates whether refreshing chart cache data

setRefreshChartCache

→ inherited from SaveOptions
public void setRefreshChartCache(boolean value)
Indicates whether refreshing chart cache data

getWarningCallback/setWarningCallback

→ inherited from SaveOptions
public IWarningCallback getWarningCallback() / public void setWarningCallback(IWarningCallback value)
Gets or sets warning callback.

setWarningCallback

→ inherited from SaveOptions
public void setWarningCallback(IWarningCallback value)
Gets or sets warning callback.

getUpdateSmartArt/setUpdateSmartArt

→ inherited from SaveOptions
public boolean getUpdateSmartArt() / public void setUpdateSmartArt(boolean value)
Indicates whether updating smart art setting. The default value is false. Only effects after calling Shape.GetResultOfSmartArt() method and the cached shapes exist in the template file.

setUpdateSmartArt

→ inherited from SaveOptions
public void setUpdateSmartArt(boolean value)
Indicates whether updating smart art setting. The default value is false. Only effects after calling Shape.GetResultOfSmartArt() method and the cached shapes exist in the template file.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.