PdfSaveOptions

Inheritance: java.lang.Object, com.aspose.cells.SaveOptions, com.aspose.cells.PaginatedSaveOptions

public class PdfSaveOptions extends PaginatedSaveOptions

Represents the options for saving pdf file.

Constructors

Constructor Description
PdfSaveOptions() Creates the options for saving pdf file.

Methods

Method Description
equals(Object arg0)
getAllColumnsInOnePagePerSheet() If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result.
getBookmark() Gets the PdfBookmarkEntry object.
getCachedFileFolder() The cached file folder is used to store some large data.
getCalculateFormula() Indicates whether to calculate formulas before saving pdf file.
getCheckFontCompatibility() Indicates whether to check font compatibility for every character in text.
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.
getClass()
getClearData() Make the workbook empty after saving the file.
getCompliance() Workbook converts to pdf will according to PdfCompliance in this property.
getCreateDirectory() If true and the directory does not exist, the directory will be automatically created before saving the file.
getCreatedTime() Gets the time of generating the pdf document.
getCustomPropertiesExport() Gets a value determining the way CustomDocumentPropertyCollection are exported to PDF file.
getDefaultEditLanguage() Gets default edit language.
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.
getDisplayDocTitle() Indicates whether the window’s title bar should display the document title.
getDrawObjectEventHandler() Implements this interface to get DrawObject and Bound when rendering.
getEmbedStandardWindowsFonts() True to embed true type fonts.
getEmfRenderSetting() Setting for rendering Emf metafile.
getExportDocumentStructure() Indicates whether to export document structure.
getFontEncoding() Gets embedded font encoding in pdf.
getGridlineType() Gets gridline type.
getIgnoreError() Indicates if you need to hide the error while rendering.
getImageType() Represents the image type when converting the chart and shape .
getMergeAreas() Indicates whether merge the areas of conditional formatting and validation before saving the file.
getOnePagePerSheet() If OnePagePerSheet is true , all content of one sheet will output to only one page in result.
getOptimizationType() Gets pdf optimization type.
getOutputBlankPageWhenNothingToPrint() Indicates whether to output a blank page when there is nothing to print.
getPageCount() Gets the number of pages to save.
getPageIndex() Gets the 0-based index of the first page to save.
getPageSavingCallback() Control/Indicate progress of page saving process.
getPdfCompression() Indicate the compression algorithm
getPrintingPageType() Indicates which pages will not be printed.
getProducer() Gets producer of generated pdf document.
getRefreshChartCache() Indicates whether refreshing chart cache data
getSaveFormat() Gets the save file format.
getSecurityOptions() Set this options, when security is need in xls2pdf result.
getSheetSet() Gets the sheets to render.
getSortExternalNames() Indicates whether sorting external defined names before saving file.
getSortNames() Indicates whether sorting defined names before saving file.
getTextCrossType() Gets displaying text type when the text width is larger than cell width.
getUpdateSmartArt() Indicates whether updating smart art setting.
getValidateMergedAreas() Indicates whether validate merged cells before saving the file.
getWarningCallback() Gets warning callback.
hashCode()
isFontSubstitutionCharGranularity() Indicates whether to only substitute the font of character when the cell font is not compatibility for it.
notify()
notifyAll()
setAllColumnsInOnePagePerSheet(boolean value) If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result.
setBookmark(PdfBookmarkEntry value) Sets the PdfBookmarkEntry object.
setCachedFileFolder(String value) The cached file folder is used to store some large data.
setCalculateFormula(boolean value) Indicates whether to calculate formulas before saving pdf file.
setCheckFontCompatibility(boolean value) Indicates whether to check font compatibility for every character in text.
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.
setClearData(boolean value) Make the workbook empty after saving the file.
setCompliance(int value) Workbook converts to pdf will according to PdfCompliance in this property.
setCreateDirectory(boolean value) If true and the directory does not exist, the directory will be automatically created before saving the file.
setCreatedTime(DateTime value) Sets the time of generating the pdf document.
setCustomPropertiesExport(int value) Sets a value determining the way CustomDocumentPropertyCollection are exported to PDF file.
setDefaultEditLanguage(int value) Sets default edit language.
setDefaultFont(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.
setDisplayDocTitle(boolean value) Indicates whether the window’s title bar should display the document title.
setDrawObjectEventHandler(DrawObjectEventHandler value) Implements this interface to get DrawObject and Bound when rendering.
setEmbedStandardWindowsFonts(boolean value) True to embed true type fonts.
setEmfRenderSetting(int value) Setting for rendering Emf metafile.
setExportDocumentStructure(boolean value) Indicates whether to export document structure.
setFontEncoding(int value) Sets embedded font encoding in pdf.
setFontSubstitutionCharGranularity(boolean value) Indicates whether to only substitute the font of character when the cell font is not compatibility for it.
setGridlineType(int value) Sets gridline type.
setIgnoreError(boolean value) Indicates if you need to hide the error while rendering.
setImageResample(int desiredPPI, int jpegQuality) Sets desired PPI(pixels per inch) of resample images and jpeg quality.
setImageType(ImageFormat value) Represents the image type when converting the chart and shape .
setMergeAreas(boolean value) Indicates whether merge the areas of conditional formatting and validation before saving the file.
setOnePagePerSheet(boolean value) If OnePagePerSheet is true , all content of one sheet will output to only one page in result.
setOptimizationType(int value) Sets pdf optimization type.
setOutputBlankPageWhenNothingToPrint(boolean value) Indicates whether to output a blank page when there is nothing to print.
setPageCount(int value) Sets the number of pages to save.
setPageIndex(int value) Sets the 0-based index of the first page to save.
setPageSavingCallback(IPageSavingCallback value) Control/Indicate progress of page saving process.
setPdfCompression(int value) Indicate the compression algorithm
setPrintingPageType(int value) Indicates which pages will not be printed.
setProducer(String value) Sets producer of generated pdf document.
setRefreshChartCache(boolean value) Indicates whether refreshing chart cache data
setSecurityOptions(PdfSecurityOptions value) Set this options, when security is need in xls2pdf result.
setSheetSet(SheetSet value) Sets the sheets to render.
setSortExternalNames(boolean value) Indicates whether sorting external defined names before saving file.
setSortNames(boolean value) Indicates whether sorting defined names before saving file.
setTextCrossType(int value) Sets displaying text type when the text width is larger than cell width.
setUpdateSmartArt(boolean value) Indicates whether updating smart art setting.
setValidateMergedAreas(boolean value) Indicates whether validate merged cells before saving the file.
setWarningCallback(IWarningCallback value) Sets warning callback.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

PdfSaveOptions()

public PdfSaveOptions()

Creates the options for saving pdf file.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

getAllColumnsInOnePagePerSheet()

public boolean getAllColumnsInOnePagePerSheet()

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.

Returns: boolean

getBookmark()

public PdfBookmarkEntry getBookmark()

Gets the PdfBookmarkEntry object.

Returns: PdfBookmarkEntry

getCachedFileFolder()

public String getCachedFileFolder()

The cached file folder is used to store some large data.

Returns: java.lang.String

getCalculateFormula()

public boolean getCalculateFormula()

Indicates whether to calculate formulas before saving pdf file. The default value is false.

Returns: boolean

getCheckFontCompatibility()

public boolean getCheckFontCompatibility()

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;

Returns: boolean

getCheckWorkbookDefaultFont()

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

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getClearData()

public boolean getClearData()

Make the workbook empty after saving the file.

Returns: boolean

getCompliance()

public int getCompliance()

Workbook converts to pdf will according to PdfCompliance in this property.

Returns: int

getCreateDirectory()

public boolean getCreateDirectory()

If true and the directory does not exist, the directory will be automatically created before saving the file. The default value is false.

Returns: boolean

getCreatedTime()

public DateTime getCreatedTime()

Gets the time of generating the pdf document. if it is not be set, it will be the time of generating the pdf.

Returns: DateTime

getCustomPropertiesExport()

public int getCustomPropertiesExport()

Gets a value determining the way CustomDocumentPropertyCollection are exported to PDF file. Default value is None.

Returns: int

getDefaultEditLanguage()

public int getDefaultEditLanguage()

Gets default edit language. It may display/render different layouts for text paragraph when different edit languages is set. Default is DefaultEditLanguage.AUTO.

Returns: int

getDefaultFont()

public 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. 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.

Returns: java.lang.String

getDisplayDocTitle()

public boolean getDisplayDocTitle()

Indicates whether the window’s title bar should display the document title. If false, the title bar should instead display the name of the PDF file. Default value is false.

Returns: boolean

getDrawObjectEventHandler()

public DrawObjectEventHandler getDrawObjectEventHandler()

Implements this interface to get DrawObject and Bound when rendering.

Returns: DrawObjectEventHandler

getEmbedStandardWindowsFonts()

public boolean getEmbedStandardWindowsFonts()

True to embed true type fonts. Affects only ASCII characters 32-127. Fonts for character codes greater than 127 are always embedded. Fonts are always embedded for PDF/A-1a, PDF/A-1b standard. Default is true.

Returns: boolean

getEmfRenderSetting()

public int getEmfRenderSetting()

Setting for rendering Emf metafile. 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. When EmfRenderSetting.EMF_PLUS_PREFER is set, then EMF+ records will be parsed while rendering to pdf, otherwise only EMF records will be parsed. Default value is EmfRenderSetting.EMF_ONLY.

Returns: int

getExportDocumentStructure()

public boolean getExportDocumentStructure()

Indicates whether to export document structure.

Returns: boolean

getFontEncoding()

public int getFontEncoding()

Gets embedded font encoding in pdf. Default value is PdfFontEncoding.IDENTITY

Returns: int

getGridlineType()

public int getGridlineType()

Gets gridline type. Default is Dotted type.

Returns: int

getIgnoreError()

public boolean getIgnoreError()

Indicates if you need to hide the error while rendering. The error can be error in shape, image, chart rendering, etc.

Returns: boolean

getImageType()

public ImageFormat getImageType()

Represents the image type when converting the chart and shape . NOTE: This member is now obsolete. Instead, Chart and Shape are always rendered as vector elements(e.g. point, line) for rendering quality. This property will be removed 12 months later since June 2022. Aspose apologizes for any inconvenience you may have experienced.

Returns: ImageFormat

getMergeAreas()

public boolean getMergeAreas()

Indicates whether merge the areas of conditional formatting and validation before saving the file. The default value is false.

Returns: boolean

getOnePagePerSheet()

public boolean getOnePagePerSheet()

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.

Returns: boolean

getOptimizationType()

public int getOptimizationType()

Gets pdf optimization type. Default value is PdfOptimizationType.STANDARD

Returns: int

getOutputBlankPageWhenNothingToPrint()

public boolean getOutputBlankPageWhenNothingToPrint()

Indicates whether to output a blank page when there is nothing to print. Default is true.

Returns: boolean

getPageCount()

public int getPageCount()

Gets the number of pages to save. Default is System.Int32.MaxValue which means all pages will be rendered..

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

Returns: int

getPageIndex()

public int getPageIndex()

Gets the 0-based index of the first page to save. Default is 0.

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

Returns: int

getPageSavingCallback()

public IPageSavingCallback getPageSavingCallback()

Control/Indicate progress of page saving process.

Returns: IPageSavingCallback

getPdfCompression()

public int getPdfCompression()

Indicate the compression algorithm

Returns: int

getPrintingPageType()

public int getPrintingPageType()

Indicates which pages will not be printed. 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.

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

Returns: int

getProducer()

public String getProducer()

Gets producer of generated pdf document. If the value is null, or a valid LICENSE is not set, string Aspose.Cells vVERSION will be used.

Returns: java.lang.String

getRefreshChartCache()

public boolean getRefreshChartCache()

Indicates whether refreshing chart cache data

Returns: boolean

getSaveFormat()

public int getSaveFormat()

Gets the save file format.

Returns: int

getSecurityOptions()

public PdfSecurityOptions getSecurityOptions()

Set this options, when security is need in xls2pdf result.

Workbook wb = new Workbook();
         wb.getWorksheets().get(0).getCells().get("A1").setValue("Aspose");
 
         PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
 
 
         PdfSecurityOptions pdfSecurityOptions = new PdfSecurityOptions();
 
         //set owner password
         pdfSecurityOptions.setOwnerPassword("YourOwnerPassword");
 
         //set user password
         pdfSecurityOptions.setUserPassword("YourUserPassword");
 
         //set print permisson
         pdfSecurityOptions.setPrintPermission(true);
 
         //set high resolution for print
         pdfSecurityOptions.setFullQualityPrintPermission(true);
 
 
         pdfSaveOptions.setSecurityOptions(pdfSecurityOptions);
 
         wb.save("output.pdf", pdfSaveOptions);

Returns: PdfSecurityOptions

getSheetSet()

public SheetSet getSheetSet()

Gets the sheets to render. Default is all visible sheets in the workbook: {@link com.aspose.cells.SheetSet.getVisible()}.

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

Returns: SheetSet

getSortExternalNames()

public boolean getSortExternalNames()

Indicates whether sorting external defined names before saving file.

Returns: boolean

getSortNames()

public boolean getSortNames()

Indicates whether sorting defined names before saving file.

Returns: boolean

getTextCrossType()

public int getTextCrossType()

Gets displaying text type when the text width is larger than cell width.

Returns: int

getUpdateSmartArt()

public boolean getUpdateSmartArt()

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.

Returns: boolean

getValidateMergedAreas()

public boolean getValidateMergedAreas()

Indicates whether validate merged cells before saving the file. The default value is false.

Returns: boolean

getWarningCallback()

public IWarningCallback getWarningCallback()

Gets warning callback.

Returns: IWarningCallback

hashCode()

public native int hashCode()

Returns: int

isFontSubstitutionCharGranularity()

public boolean isFontSubstitutionCharGranularity()

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.

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAllColumnsInOnePagePerSheet(boolean value)

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.

Parameters:

Parameter Type Description
value boolean

setBookmark(PdfBookmarkEntry value)

public void setBookmark(PdfBookmarkEntry value)

Sets the PdfBookmarkEntry object.

Parameters:

Parameter Type Description
value PdfBookmarkEntry

setCachedFileFolder(String value)

public void setCachedFileFolder(String value)

The cached file folder is used to store some large data.

Parameters:

Parameter Type Description
value java.lang.String

setCalculateFormula(boolean value)

public void setCalculateFormula(boolean value)

Indicates whether to calculate formulas before saving pdf file. The default value is false.

Parameters:

Parameter Type Description
value boolean

setCheckFontCompatibility(boolean value)

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;

Parameters:

Parameter Type Description
value boolean

setCheckWorkbookDefaultFont(boolean value)

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.

Parameters:

Parameter Type Description
value boolean

setClearData(boolean value)

public void setClearData(boolean value)

Make the workbook empty after saving the file.

Parameters:

Parameter Type Description
value boolean

setCompliance(int value)

public void setCompliance(int value)

Workbook converts to pdf will according to PdfCompliance in this property.

Parameters:

Parameter Type Description
value int

setCreateDirectory(boolean value)

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.

Parameters:

Parameter Type Description
value boolean

setCreatedTime(DateTime value)

public void setCreatedTime(DateTime value)

Sets the time of generating the pdf document. if it is not be set, it will be the time of generating the pdf.

Parameters:

Parameter Type Description
value DateTime

setCustomPropertiesExport(int value)

public void setCustomPropertiesExport(int value)

Sets a value determining the way CustomDocumentPropertyCollection are exported to PDF file. Default value is None.

Parameters:

Parameter Type Description
value int

setDefaultEditLanguage(int value)

public void setDefaultEditLanguage(int value)

Sets default edit language. It may display/render different layouts for text paragraph when different edit languages is set. Default is DefaultEditLanguage.AUTO.

Parameters:

Parameter Type Description
value int

setDefaultFont(String value)

public void setDefaultFont(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.

Parameters:

Parameter Type Description
value java.lang.String

setDisplayDocTitle(boolean value)

public void setDisplayDocTitle(boolean value)

Indicates whether the window’s title bar should display the document title. If false, the title bar should instead display the name of the PDF file. Default value is false.

Parameters:

Parameter Type Description
value boolean

setDrawObjectEventHandler(DrawObjectEventHandler value)

public void setDrawObjectEventHandler(DrawObjectEventHandler value)

Implements this interface to get DrawObject and Bound when rendering.

Parameters:

Parameter Type Description
value DrawObjectEventHandler

setEmbedStandardWindowsFonts(boolean value)

public void setEmbedStandardWindowsFonts(boolean value)

True to embed true type fonts. Affects only ASCII characters 32-127. Fonts for character codes greater than 127 are always embedded. Fonts are always embedded for PDF/A-1a, PDF/A-1b standard. Default is true.

Parameters:

Parameter Type Description
value boolean

setEmfRenderSetting(int value)

public void setEmfRenderSetting(int value)

Setting for rendering Emf metafile. 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. When EmfRenderSetting.EMF_PLUS_PREFER is set, then EMF+ records will be parsed while rendering to pdf, otherwise only EMF records will be parsed. Default value is EmfRenderSetting.EMF_ONLY.

Parameters:

Parameter Type Description
value int

setExportDocumentStructure(boolean value)

public void setExportDocumentStructure(boolean value)

Indicates whether to export document structure.

Parameters:

Parameter Type Description
value boolean

setFontEncoding(int value)

public void setFontEncoding(int value)

Sets embedded font encoding in pdf. Default value is PdfFontEncoding.IDENTITY

Parameters:

Parameter Type Description
value int

setFontSubstitutionCharGranularity(boolean value)

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.

Parameters:

Parameter Type Description
value boolean

setGridlineType(int value)

public void setGridlineType(int value)

Sets gridline type. Default is Dotted type.

Parameters:

Parameter Type Description
value int

setIgnoreError(boolean value)

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.

Parameters:

Parameter Type Description
value boolean

setImageResample(int desiredPPI, int jpegQuality)

public void setImageResample(int desiredPPI, int jpegQuality)

Sets desired PPI(pixels per inch) of resample images and jpeg quality. All images will be converted to JPEG with the specified quality setting, and images that are greater than the specified PPI (pixels per inch) will be resampled.

//load the source file with images.
         Workbook wb = new Workbook("Book1.xlsx");
 
         PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
 
         //set desired PPI as 96 and jpeg quality as 80.
         pdfSaveOptions.setImageResample(96, 80);
 
         wb.save("output.pdf", pdfSaveOptions);

Parameters:

Parameter Type Description
desiredPPI int Desired pixels per inch. 220 high quality. 150 screen quality. 96 email quality.
jpegQuality int 0 - 100% JPEG quality.

setImageType(ImageFormat value)

public void setImageType(ImageFormat value)

Represents the image type when converting the chart and shape . NOTE: This member is now obsolete. Instead, Chart and Shape are always rendered as vector elements(e.g. point, line) for rendering quality. This property will be removed 12 months later since June 2022. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

Parameter Type Description
value ImageFormat

setMergeAreas(boolean value)

public void setMergeAreas(boolean value)

Indicates whether merge the areas of conditional formatting and validation before saving the file. The default value is false.

Parameters:

Parameter Type Description
value boolean

setOnePagePerSheet(boolean value)

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.

Parameters:

Parameter Type Description
value boolean

setOptimizationType(int value)

public void setOptimizationType(int value)

Sets pdf optimization type. Default value is PdfOptimizationType.STANDARD

Parameters:

Parameter Type Description
value int

setOutputBlankPageWhenNothingToPrint(boolean value)

public void setOutputBlankPageWhenNothingToPrint(boolean value)

Indicates whether to output a blank page when there is nothing to print. Default is true.

Parameters:

Parameter Type Description
value boolean

setPageCount(int value)

public void setPageCount(int value)

Sets the number of pages to save. Default is System.Int32.MaxValue which means all pages will be rendered..

Parameters:

Parameter Type Description
value int

setPageIndex(int value)

public void setPageIndex(int value)

Sets the 0-based index of the first page to save. Default is 0.

Parameters:

Parameter Type Description
value int

setPageSavingCallback(IPageSavingCallback value)

public void setPageSavingCallback(IPageSavingCallback value)

Control/Indicate progress of page saving process.

Parameters:

Parameter Type Description
value IPageSavingCallback

setPdfCompression(int value)

public void setPdfCompression(int value)

Indicate the compression algorithm

Parameters:

Parameter Type Description
value int

setPrintingPageType(int value)

public void setPrintingPageType(int value)

Indicates which pages will not be printed. 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.

Parameters:

Parameter Type Description
value int

setProducer(String value)

public void setProducer(String value)

Sets producer of generated pdf document. If the value is null, or a valid LICENSE is not set, string Aspose.Cells vVERSION will be used.

Parameters:

Parameter Type Description
value java.lang.String

setRefreshChartCache(boolean value)

public void setRefreshChartCache(boolean value)

Indicates whether refreshing chart cache data

Parameters:

Parameter Type Description
value boolean

setSecurityOptions(PdfSecurityOptions value)

public void setSecurityOptions(PdfSecurityOptions value)

Set this options, when security is need in xls2pdf result.

Parameters:

Parameter Type Description
value PdfSecurityOptions

setSheetSet(SheetSet value)

public void setSheetSet(SheetSet value)

Sets the sheets to render. Default is all visible sheets in the workbook: {@link com.aspose.cells.SheetSet.getVisible()}.

Parameters:

Parameter Type Description
value SheetSet

setSortExternalNames(boolean value)

public void setSortExternalNames(boolean value)

Indicates whether sorting external defined names before saving file.

Parameters:

Parameter Type Description
value boolean

setSortNames(boolean value)

public void setSortNames(boolean value)

Indicates whether sorting defined names before saving file.

Parameters:

Parameter Type Description
value boolean

setTextCrossType(int value)

public void setTextCrossType(int value)

Sets displaying text type when the text width is larger than cell width.

Parameters:

Parameter Type Description
value int

setUpdateSmartArt(boolean value)

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.

Parameters:

Parameter Type Description
value boolean

setValidateMergedAreas(boolean value)

public void setValidateMergedAreas(boolean value)

Indicates whether validate merged cells before saving the file. The default value is false.

Parameters:

Parameter Type Description
value boolean

setWarningCallback(IWarningCallback value)

public void setWarningCallback(IWarningCallback value)

Sets warning callback.

Parameters:

Parameter Type Description
value IWarningCallback

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int