Class TessResultRenderer

    • Constructor Detail

    • Method Detail

      • BeginDocument

        @Cast("bool")
        public boolean BeginDocument​(@Cast("const char*")
                                     BytePointer title)
        Starts a new document with the given title. This clears the contents of the output data. Title should use UTF-8 encoding.
      • BeginDocument

        @Cast("bool")
        public boolean BeginDocument​(String title)
      • AddImage

        @Cast("bool")
        public boolean AddImage​(TessBaseAPI api)
        Adds the recognized text from the source image to the current document. Invalid if BeginDocument not yet called. Note that this API is a bit weird but is designed to fit into the current TessBaseAPI implementation where the api has lots of state information that we might want to add in.
      • EndDocument

        @Cast("bool")
        public boolean EndDocument()
        Finishes the document and finalizes the output data Invalid if BeginDocument not yet called.
      • happy

        @Cast("bool")
        public boolean happy()
      • imagenum

        public int imagenum()
        Returns the index of the last image given to AddImage (i.e. images are incremented whether the image succeeded or not) This is always defined. It means either the number of the current image, the last image ended, or in the completed document depending on when in the document lifecycle you are looking at it. Will return -1 if a document was never started.