com.groupdocs.redaction

Class Redactor



  • public class Redactor
    extends Object

    Redactor determines document format and provides an instance of a redactable document

    • Constructor Detail

      • Redactor

        public Redactor()
    • Method Detail

      • getRedactionCallback

        public static IRedactionCallback getRedactionCallback()

        An instance implementing IRedactionCallback

      • setRedactionCallback

        public static void setRedactionCallback(IRedactionCallback value)

        An instance implementing IRedactionCallback

      • load

        public static Document load(String filePath)
                             throws Exception

        Open document from a file

        Parameters:
        filePath - Path to the file
        Returns:
        An instance of Document class
        Throws:
        Exception
      • load

        public static Document load(InputStream input)
                             throws Exception

        Open document from a stream

        Parameters:
        input - Source stream of the document
        Returns:
        An instance of Document class
        Throws:
        Exception
      • load

        public static Document load(String filePath,
                    LoadOptions options)
                             throws Exception

        Open document with specific format configuration for a custom format type from file

        Parameters:
        filePath - Path to the document
        options - Options to load specific document
        Returns:
        An instance of Document class
        Throws:
        Exception
      • load

        public static Document load(InputStream input,
                    LoadOptions options)
                             throws Exception

        Open document with specific format configuration for a custom format type from stream

        Parameters:
        input - Source input stream
        options - Options to load specific document
        Returns:
        An instance of Document class
        Throws:
        Exception
      • determineFormat

        public static DocumentFormatConfiguration determineFormat(InputStream input,
                                                  String fileExtension)
                                                           throws Exception

        Determines document format from the document's stream and file extension

        Parameters:
        input - Source stream
        fileExtension - File extension
        Returns:
        DocumentFormatInstance type
        Throws:
        Exception