Class AngleCollector


  • class AngleCollector
    extends PDFTextStripper
    Collect all angles while doing text extraction. Angles are in degrees and rounded to the closest integer (to avoid slight differences from floating point arithmetic resulting in similarly angled glyphs being treated separately). This class must be constructed for each page so that the angle set is initialized.
    • Field Detail

      • angles

        private final java.util.Set<java.lang.Integer> angles
    • Constructor Detail

      • AngleCollector

        AngleCollector()
                throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getAngles

        java.util.Set<java.lang.Integer> getAngles()
      • processTextPosition

        protected void processTextPosition​(TextPosition text)
        Description copied from class: PDFTextStripper
        This will process a TextPosition object and add the text to the list of characters on a page. It takes care of overlapping text.
        Overrides:
        processTextPosition in class PDFTextStripper
        Parameters:
        text - The text to process.