Class OCRPageObject

java.lang.Object
nl.dannyj.mistral.models.ocr.OCRPageObject

public class OCRPageObject extends Object
Represents the OCR information for a single page.
  • Constructor Details

    • OCRPageObject

      public OCRPageObject()
    • OCRPageObject

      public OCRPageObject(Integer index, String markdown, List<OCRImageObject> images, OCRPageDimensions dimensions)
      Creates a new OCRPageObject instance.
      Parameters:
      index - The page index in a PDF document starting from 0.
      markdown - The markdown string response of the page.
      images - List of all extracted images in the page.
      dimensions - The dimensions of the PDF Page's screenshot image.
  • Method Details

    • builder

      public static OCRPageObject.OCRPageObjectBuilder builder()
    • getIndex

      public Integer getIndex()
      The page index in a PDF document starting from 0.
      Returns:
      The page index.
    • getMarkdown

      public String getMarkdown()
      The markdown string response of the page.
      Returns:
      The markdown string response.
    • getImages

      public List<OCRImageObject> getImages()
      List of all extracted images in the page.
      Returns:
      The list of extracted images.
    • getDimensions

      public OCRPageDimensions getDimensions()
      The dimensions of the PDF Page's screenshot image.
      Returns:
      The dimensions of the page.
    • setIndex

      public void setIndex(Integer index)
      The page index in a PDF document starting from 0.
    • setMarkdown

      public void setMarkdown(String markdown)
      The markdown string response of the page.
    • setImages

      public void setImages(List<OCRImageObject> images)
      List of all extracted images in the page.
    • setDimensions

      public void setDimensions(OCRPageDimensions dimensions)
      The dimensions of the PDF Page's screenshot image.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object