com.groupdocs.redaction.configuration

Class RedactorConfiguration



  • public class RedactorConfiguration
    extends Object

    Provides access to a list of supported formats, built-in and custom user formats.


    Learn more

    The following example demonstrates how to add a custom user format handler.

    DocumentFormatConfiguration adobePhotoshopSettings = new DocumentFormatConfiguration();
     adobePhotoshopSettings.setExtensionFilter(".psd");
     adobePhotoshopSettings.setDocumentType(MyAdobePhotoshopFormatInstance.class);
     RedactorConfiguration configuration = RedactorConfiguration.getInstance();
     configuration.getAvailableFormats().add(adobePhotoshopSettings);
      
    • Constructor Detail

      • RedactorConfiguration

        public RedactorConfiguration()
    • Method Detail

      • getAvailableFormats

        public final List<DocumentFormatConfiguration> getAvailableFormats()

        Gets a list of recognized formats, see DocumentFormatConfiguration.

        Returns:
        A list of recognized formats, see DocumentFormatConfiguration.
      • findFormat

        public final DocumentFormatConfiguration findFormat(String fileExtension)

        Finds format configurations for a given file extension.

        Parameters:
        fileExtension - File extension, format is ".ext"
        Returns:
        If found, instance of DocumentFormatConfiguration, null otherwise