aspose.cells

Class PdfSaveOptions

Represents the options for saving pdf file.

Constructor Summary
PdfSaveOptions()
Creates the options for saving pdf file.
PdfSaveOptions(saveFormat)
Creates the options for saving pdf file.
 
Property Getters/Setters Summary
functiongetAllColumnsInOnePagePerSheet()
function
           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.
functiongetBookmark()
function
           Gets and sets the PdfBookmarkEntry object.
functiongetCachedFileFolder()
function
           The cached file folder is used to store some large data.
functiongetCalculateFormula()
function
           Indicates whether to calculate formulas before saving pdf file.
functiongetCheckFontCompatibility()
function
           Indicates whether to check font compatibility for every character in text.
functiongetCheckWorkbookDefaultFont()
function
           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.
functiongetClearData()
function
           Make the workbook empty after saving the file.
functiongetCompliance()
function
           Workbook converts to pdf will according to PdfCompliance in this property. The value of the property is PdfCompliance integer constant.
functiongetCreateDirectory()
function
           If true and the directory does not exist, the directory will be automatically created before saving the file.
functiongetCreatedTime()
function
           Gets and sets the time of generating the pdf document.
functiongetCustomPropertiesExport()
function
           Gets or sets a value determining the way CustomDocumentPropertyCollection are exported to PDF file. Default value is None. The value of the property is PdfCustomPropertiesExport integer constant.
functiongetDefaultEditLanguage()
function
           Gets or sets default edit language. The value of the property is DefaultEditLanguage integer constant.
functiongetDefaultFont()
function
           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.
functiongetDisplayDocTitle()
function
           Indicates whether the window's title bar should display the document title.
functiongetDrawObjectEventHandler()
function
           Implements this interface to get DrawObject and Bound when rendering.
functiongetEmbedStandardWindowsFonts()
function
           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.
functiongetEmfRenderSetting()
function
           Setting for rendering Emf metafile. The value of the property is EmfRenderSetting integer constant.
functiongetEnableHTTPCompression()
function
           Indicates if http compression is to be used in user's IIS.
functiongetExportDocumentStructure()
function
           Indicates whether to export document structure.
functiongetFontEncoding()
function
           Gets or sets embedded font encoding in pdf. The value of the property is PdfFontEncoding integer constant.
functiongetGridlineType()
function
           Gets or sets gridline type. The value of the property is GridlineType integer constant.
functiongetIgnoreError()
function
           Indicates if you need to hide the error while rendering. The error can be error in shape, image, chart rendering, etc.
functiongetImageType()
function
           Represents the image type when converting the chart and shape .
functionisFontSubstitutionCharGranularity()
function
           Indicates whether to only substitute the font of character when the cell font is not compatibility for it.
functiongetMergeAreas()
function
           Indicates whether merge the areas of conditional formatting and validation before saving the file.
functiongetOnePagePerSheet()
function
           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.
functiongetOptimizationType()
function
           Gets and sets pdf optimization type. The value of the property is PdfOptimizationType integer constant.
functiongetOutputBlankPageWhenNothingToPrint()
function
           Indicates whether to output a blank page when there is nothing to print.
functiongetPageCount()
function
           Gets or sets the number of pages to save.
functiongetPageIndex()
function
           Gets or sets the 0-based index of the first page to save.
functiongetPageSavingCallback()
function
           Control/Indicate progress of page saving process.
functiongetPdfCompression()
function
           Indicate the compression algorithm The value of the property is PdfCompressionCore integer constant.
functiongetPdfExportImagesFolder()
function
           The physical folder where images will be saved when exporting a workbook to Aspose.Pdf XML format. Default is an empty string.
functiongetPrintingPageType()
function
           Indicates which pages will not be printed. The value of the property is PrintingPageType integer constant.
functiongetProducer()
function
           Gets and sets producer of generated pdf document.
functiongetRefreshChartCache()
function
           Indicates whether refreshing chart cache data
functiongetSaveFormat()
Gets the save file format. The value of the property is SaveFormat integer constant.
functiongetSecurityOptions()
function
           Set this options, when security is need in xls2pdf result.
functiongetSortExternalNames()
function
           Indicates whether sorting external defined names before saving file.
functiongetSortNames()
function
           Indicates whether sorting defined names before saving file.
functiongetTextCrossType()
function
           Gets or sets displaying text type when the text width is larger than cell width. The value of the property is TextCrossType integer constant.
functiongetUpdateSmartArt()
function
           Indicates whether updating smart art setting. The default value is false.
functiongetValidateMergedAreas()
function
           Indicates whether validate merged cells before saving the file.
 
Method Summary
functionsetImageResample(desiredPPI, 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.
 

    • Constructor Detail

      • PdfSaveOptions

        function PdfSaveOptions()
        Creates the options for saving pdf file.
      • PdfSaveOptions

        function PdfSaveOptions(saveFormat)
        Creates the options for saving pdf file. NOTE: This constructor is now obsolete. Instead, please use PdfSaveOptions() constructor. This property will be removed 12 months later since January 2021. Aspose apologizes for any inconvenience you may have experienced.
        Parameters:
        saveFormat: Number - A SaveFormat value. The save format.It must be pdf.
    • Property Getters/Setters Detail

      • getPrintingPageType/setPrintingPageType : Number 

        function getPrintingPageType() / function setPrintingPageType(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.
      • getEmbedStandardWindowsFonts/setEmbedStandardWindowsFonts : boolean 

        function getEmbedStandardWindowsFonts() / function setEmbedStandardWindowsFonts(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.
      • getCompliance/setCompliance : Number 

        function getCompliance() / function setCompliance(value)
        
        Workbook converts to pdf will according to PdfCompliance in this property. The value of the property is PdfCompliance integer constant.
      • getDefaultFont/setDefaultFont : String 

        function getDefaultFont() / function setDefaultFont(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 : boolean 

        function getCheckWorkbookDefaultFont() / function setCheckWorkbookDefaultFont(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.
      • getSecurityOptions/setSecurityOptions : PdfSecurityOptions 

        function getSecurityOptions() / function setSecurityOptions(value)
        
        Set this options, when security is need in xls2pdf result.
      • getOnePagePerSheet/setOnePagePerSheet : boolean 

        function getOnePagePerSheet() / function setOnePagePerSheet(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 : boolean 

        function getAllColumnsInOnePagePerSheet() / function setAllColumnsInOnePagePerSheet(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.
      • getImageType/setImageType : ImageFormat 

        function getImageType() / function setImageType(value)
        
        Represents the image type when converting the chart and shape .
      • getCalculateFormula/setCalculateFormula : boolean 

        function getCalculateFormula() / function setCalculateFormula(value)
        
        Indicates whether to calculate formulas before saving pdf file. The default value is false.
      • getPdfCompression/setPdfCompression : Number 

        function getPdfCompression() / function setPdfCompression(value)
        
        Indicate the compression algorithm The value of the property is PdfCompressionCore integer constant.
      • getCheckFontCompatibility/setCheckFontCompatibility : boolean 

        function getCheckFontCompatibility() / function setCheckFontCompatibility(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;
      • getPageIndex/setPageIndex : Number 

        function getPageIndex() / function setPageIndex(value)
        
        Gets or sets the 0-based index of the first page to save. Default is 0.
      • getPageCount/setPageCount : Number 

        function getPageCount() / function setPageCount(value)
        
        Gets or sets the number of pages to save. Default is System.Int32.MaxValue which means all pages will be rendered..
      • getCreatedTime/setCreatedTime : DateTime 

        function getCreatedTime() / function setCreatedTime(value)
        
        Gets and sets the time of generating the pdf document. if it is not be set, it will be the time of generating the pdf.
      • getProducer/setProducer : String 

        function getProducer() / function setProducer(value)
        
        Gets and 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.
      • getOptimizationType/setOptimizationType : Number 

        function getOptimizationType() / function setOptimizationType(value)
        
        Gets and sets pdf optimization type. The value of the property is PdfOptimizationType integer constant. Default value is PdfOptimizationType.STANDARD
      • isFontSubstitutionCharGranularity/setFontSubstitutionCharGranularity : boolean 

        function isFontSubstitutionCharGranularity() / function setFontSubstitutionCharGranularity(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.
      • getGridlineType/setGridlineType : Number 

        function getGridlineType() / function setGridlineType(value)
        
        Gets or sets gridline type. The value of the property is GridlineType integer constant. Default is Dotted type.
      • getTextCrossType/setTextCrossType : Number 

        function getTextCrossType() / function setTextCrossType(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.
      • getIgnoreError/setIgnoreError : boolean 

        function getIgnoreError() / function setIgnoreError(value)
        
        Indicates if you need to hide the error while rendering. The error can be error in shape, image, chart rendering, etc.
      • getOutputBlankPageWhenNothingToPrint/setOutputBlankPageWhenNothingToPrint : boolean 

        function getOutputBlankPageWhenNothingToPrint() / function setOutputBlankPageWhenNothingToPrint(value)
        
        Indicates whether to output a blank page when there is nothing to print. Default is true.
      • getDrawObjectEventHandler/setDrawObjectEventHandler : DrawObjectEventHandler 

        function getDrawObjectEventHandler() / function setDrawObjectEventHandler(value)
        
        Implements this interface to get DrawObject and Bound when rendering.
      • getCustomPropertiesExport/setCustomPropertiesExport : Number 

        function getCustomPropertiesExport() / function setCustomPropertiesExport(value)
        
        Gets or sets a value determining the way CustomDocumentPropertyCollection are exported to PDF file. Default value is None. The value of the property is PdfCustomPropertiesExport integer constant.
      • getExportDocumentStructure/setExportDocumentStructure : boolean 

        function getExportDocumentStructure() / function setExportDocumentStructure(value)
        
        Indicates whether to export document structure.
      • getPageSavingCallback/setPageSavingCallback : IPageSavingCallback 

        function getPageSavingCallback() / function setPageSavingCallback(value)
        
        Control/Indicate progress of page saving process.
      • getEmfRenderSetting/setEmfRenderSetting : Number 

        function getEmfRenderSetting() / function setEmfRenderSetting(value)
        
        Setting for rendering Emf metafile. The value of the property is EmfRenderSetting integer constant. 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 #Error Cref: !:EmfRenderSetting.EmfPlusPrefer is set, then EMF+ records will be parsed while rendering to pdf, otherwise only EMF records will be parsed. Default value is #Error Cref: !:EmfRenderSetting.EmfOnly.
      • getDisplayDocTitle/setDisplayDocTitle : boolean 

        function getDisplayDocTitle() / function setDisplayDocTitle(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.
      • getDefaultEditLanguage/setDefaultEditLanguage : Number 

        function getDefaultEditLanguage() / function setDefaultEditLanguage(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 #Error Cref: !:DefaultEditLanguage.Auto.
      • getFontEncoding/setFontEncoding : Number 

        function getFontEncoding() / function setFontEncoding(value)
        
        Gets or sets embedded font encoding in pdf. The value of the property is PdfFontEncoding integer constant. Default value is PdfFontEncoding.IDENTITY
      • getSaveFormat : Number 

        function getSaveFormat()
        
        Gets the save file format. The value of the property is SaveFormat integer constant.
      • getClearData/setClearData : boolean 

        function getClearData() / function setClearData(value)
        
        Make the workbook empty after saving the file.
      • getCachedFileFolder/setCachedFileFolder : String 

        function getCachedFileFolder() / function setCachedFileFolder(value)
        
        The cached file folder is used to store some large data.
      • getValidateMergedAreas/setValidateMergedAreas : boolean 

        function getValidateMergedAreas() / function setValidateMergedAreas(value)
        
        Indicates whether validate merged cells before saving the file. The default value is false.
      • getMergeAreas/setMergeAreas : boolean 

        function getMergeAreas() / function setMergeAreas(value)
        
        Indicates whether merge the areas of conditional formatting and validation before saving the file. The default value is false.
      • getCreateDirectory/setCreateDirectory : boolean 

        function getCreateDirectory() / function setCreateDirectory(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 : boolean 

        function getSortNames() / function setSortNames(value)
        
        Indicates whether sorting defined names before saving file.
      • getSortExternalNames/setSortExternalNames : boolean 

        function getSortExternalNames() / function setSortExternalNames(value)
        
        Indicates whether sorting external defined names before saving file.
      • getRefreshChartCache/setRefreshChartCache : boolean 

        function getRefreshChartCache() / function setRefreshChartCache(value)
        
        Indicates whether refreshing chart cache data
      • getPdfExportImagesFolder/setPdfExportImagesFolder : String 

        function getPdfExportImagesFolder() / function setPdfExportImagesFolder(value)
        
        The physical folder where images will be saved when exporting a workbook to Aspose.Pdf XML format. Default is an empty string.
      • getEnableHTTPCompression/setEnableHTTPCompression : boolean 

        function getEnableHTTPCompression() / function setEnableHTTPCompression(value)
        
        Indicates if http compression is to be used in user's IIS. Please specify this property to true if http compression is used.
      • getUpdateSmartArt/setUpdateSmartArt : boolean 

        function getUpdateSmartArt() / function setUpdateSmartArt(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.
    • Method Detail

      • setImageResample

        function setImageResample(desiredPPI, 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.
        Parameters:
        desiredPPI: Number - Desired pixels per inch. 220 high quality. 150 screen quality. 96 email quality.
        jpegQuality: Number - 0 - 100% JPEG quality.