com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class PdfFormatConversionOptions



  • public class PdfFormatConversionOptions
    extends Object

    represents set of options for convert PDF document

    • Constructor Detail

      • PdfFormatConversionOptions

        public PdfFormatConversionOptions(String outputLogFileName,
                                          int format,
                                          int action)

        Constructor

        Parameters:
        outputLogFileName - Path to file where comments will be stored.
        format - The pdf format.
        action - Action for objects that can not be converted
        See Also:
        PdfFormat, ConvertErrorAction
      • PdfFormatConversionOptions

        public PdfFormatConversionOptions(String outputLogFileName,
                                          int format)

        Constructor

        Parameters:
        outputLogFileName - Path to file where comments will be stored.
        format - The pdf format.
        See Also:
        PdfFormat
      • PdfFormatConversionOptions

        public PdfFormatConversionOptions(int format)

        Constructor

        Parameters:
        format - The pdf format.
        See Also:
        PdfFormat
      • PdfFormatConversionOptions

        public PdfFormatConversionOptions(int format,
                                          int action)

        Constructor

        Parameters:
        format - The pdf format.
        action - Action for objects that can not be converted
        See Also:
        PdfFormat, ConvertErrorAction
      • PdfFormatConversionOptions

        public PdfFormatConversionOptions(String outputLogFileName,
                                          int format,
                                          int action,
                                          int transparencyAction)

        Constructor

        Parameters:
        outputLogFileName - Path to file where comments will be stored.
        format - The pdf format.
        action - Action for objects that can not be converted
        transparencyAction - Action for image masked objects
        See Also:
        PdfFormat, ConvertErrorAction, ConvertTransparencyAction
      • PdfFormatConversionOptions

        public PdfFormatConversionOptions(OutputStream outputLogStream,
                                          int format,
                                          int action)

        Constructor

        Parameters:
        outputLogStream - Stream where comments will be stored
        format - The pdf format
        action - Action for objects that can not be converted
        See Also:
        PdfFormat, ConvertErrorAction
    • Method Detail

      • isLowMemoryMode

        public boolean isLowMemoryMode()

        Is low memory conversion mode enabled

        Returns:
        boolean value
      • setLowMemoryMode

        public void setLowMemoryMode(boolean value)

        Is low memory conversion mode enabled

        Parameters:
        value - boolean value
      • getFormat

        public int getFormat()

        PDF format.

        Returns:
        PdfFormat element
        See Also:
        PdfFormat
      • setFormat

        public void setFormat(int value)

        PDF format.

        Parameters:
        value - PdfFormat element
        See Also:
        PdfFormat
      • getLogFileName

        public String getLogFileName()

        Path to file where comments will be stored.

        Returns:
        String object
      • setLogFileName

        public void setLogFileName(String value)

        Path to file where comments will be stored.

        Parameters:
        value - String object
      • getLogStream

        public OutputStream getLogStream()

        Stream where comments will be stored.

        Returns:
        OutputStream object
      • setLogStream

        public void setLogStream(OutputStream value)

        Stream where comments will be stored.

        Parameters:
        value - OutputStream object
      • getErrorAction

        public int getErrorAction()

        Action for objects that can not be converted

        Returns:
        ConvertErrorAction element
        See Also:
        ConvertErrorAction
      • setErrorAction

        public void setErrorAction(int value)

        Action for objects that can not be converted

        Parameters:
        value - ConvertErrorAction element
        See Also:
        ConvertErrorAction
      • getTransparencyAction

        public int getTransparencyAction()

        Action for image masked objects

        Returns:
        ConvertTransparencyAction element
        See Also:
        ConvertTransparencyAction
      • setTransparencyAction

        public void setTransparencyAction(int value)

        Action for image masked objects

        Parameters:
        value - ConvertTransparencyAction element
        See Also:
        ConvertTransparencyAction
      • getDefault

        public static PdfFormatConversionOptions getDefault()

        Gets PdfFormatConversionOptions object with default parameters

        Returns:
        PdfFormatConversionOptions object
      • getNonSpecificationCases

        public PdfFormatConversionOptions.PdfANonSpecificationFlags getNonSpecificationCases()

        Holds flags to control PDF/A conversion process for cases when source document doesn't correspond to PDF/A specification.

        Returns:
        PdfANonSpecificationFlags object
      • getSymbolicFontEncodingStrategy

        public PdfASymbolicFontEncodingStrategy getSymbolicFontEncodingStrategy()

        Strategy to copy encoding data for symbolic fonts if symbolic TrueType font has more than one encoding subtable.

        Returns:
        PdfASymbolicFontEncodingStrategy object
      • setSymbolicFontEncodingStrategy

        public void setSymbolicFontEncodingStrategy(PdfASymbolicFontEncodingStrategy value)

        Strategy to copy encoding data for symbolic fonts if symbolic TrueType font has more than one encoding subtable.

        Parameters:
        value - PdfASymbolicFontEncodingStrategy object
      • getAlignText

        public boolean getAlignText()

        This flag controls text alignment in converted document. By default document conversion doesn't affect text alignment and leave text as is. But in some cases font substitution causes text overlapping or extra spaces in converted document. When this flag is set special alignment operations will be performed. This flag should be set only for documents which have problems with overlapped text or extra text spaces cause using of this flag decrease performance and in some cases could corrupt text content.

        Returns:
        boolean value
      • setAlignText

        public void setAlignText(boolean value)

        This flag controls text alignment in converted document. By default document conversion doesn't affect text alignment and leave text as is. But in some cases font substitution causes text overlapping or extra spaces in converted document. When this flag is set special alignment operations will be performed. This flag should be set only for documents which have problems with overlapped text or extra text spaces cause using of this flag decrease performance and in some cases could corrupt text content.

        Parameters:
        value - boolean value
      • setPuaTextProcessingStrategy

        public void setPuaTextProcessingStrategy(int value)

        Strategy to process symbols from unicode Private Use Area (PUA).

        Parameters:
        value - PuaProcessingStrategy element
        See Also:
        PdfFormatConversionOptions.PuaProcessingStrategy
      • getOptimizeFileSize

        public boolean getOptimizeFileSize()

        Gets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.

        Now this flag impacts on optimization of fonts used in PDF document, possibly, in future, this flag also will be used to switch on optimization for another data structures, such as graphic.

        Set of this flag and mode could significantly reduce file size but at the same time it could significantly decrease performance of conversion.

        Returns:
        boolean value
      • setOptimizeFileSize

        public void setOptimizeFileSize(boolean value)

        Sets a flag which enables/disables special conversion mode to get PDF/A document with reduced file size.

        Now this flag impacts on optimization of fonts used in PDF document, possibly, in future, this flag also will be used to switch on optimization for another data structures, such as graphic.

        Set of this flag and mode could significantly reduce file size but at the same time it could significantly decrease performance of conversion.

        Parameters:
        value - boolean value
      • getExcludeFontsStrategy

        public byte getExcludeFontsStrategy()

        Strategy(ies) to exclude superfluous fonts and reduce document file size. This parameter has sense only when flag OptimizeFileSize is set to true. By default combination of strategies SubsetFonts and RemoveDuplicatedFonts is used.

        Returns:
        byte value
        See Also:
        RemoveFontsStrategy
      • setExcludeFontsStrategy

        public void setExcludeFontsStrategy(byte value)

        Strategy(ies) to exclude superfluous fonts and reduce document file size. This parameter has sense only when flag OptimizeFileSize is set to true. By default combination of strategies SubsetFonts and RemoveDuplicatedFonts is used.

        Parameters:
        value - boolean value
      • getFontEmbeddingOptions

        public FontEmbeddingOptions getFontEmbeddingOptions()

        Options for cases when it's not possible to embed some fonts into PDF document.

        Returns:
        FontEmbeddingOptions object
      • getUnicodeProcessingRules

        public ToUnicodeProcessingRules getUnicodeProcessingRules()

        Rules to solve problems with unicode mapping. Can be null.

        Returns:
        ToUnicodeProcessingRules object
      • setUnicodeProcessingRules

        public void setUnicodeProcessingRules(ToUnicodeProcessingRules value)

        Rules to solve problems with unicode mapping. Can be null.

        Parameters:
        value - ToUnicodeProcessingRules object
      • getIccProfileFileName

        public String getIccProfileFileName()

        Gets the filename of icc profile name. In case of null the default icc profile used.

        Returns:
        String object
      • setIccProfileFileName

        public void setIccProfileFileName(String value)

        Sets the filename of icc profile name. In case of null the default icc profile used.

        Parameters:
        value - String object
      • getNotAccessibleFonts

        public String[] getNotAccessibleFonts()

        This property is out-property. It holds all the fonts(font names) which were not found on computer at last PDF/A conversion.

        Returns:
        Array of Strings
      • getTransparencyResolution

        public int getTransparencyResolution()

        Sets resolution during converting transparent images. The higher resolution, the slower converting speed. The default value is 300.

        Returns:
        Resolution value
      • setTransparencyResolution

        public void setTransparencyResolution(int dpi)

        Sets resolution during converting transparent images. The higher resolution, the slower converting speed. The default value is 300.

        Parameters:
        dpi - Resolution value
      • addNotAccessibleFont

        public void addNotAccessibleFont(String fontName)