Class LocationTextExtractionStrategy.TextChunkLocationDefaultImp
java.lang.Object
com.itextpdf.text.pdf.parser.LocationTextExtractionStrategy.TextChunkLocationDefaultImp
- All Implemented Interfaces:
LocationTextExtractionStrategy.TextChunkLocation, Comparable<LocationTextExtractionStrategy.TextChunkLocation>
- Enclosing class:
LocationTextExtractionStrategy
public static class LocationTextExtractionStrategy.TextChunkLocationDefaultImp
extends Object
implements LocationTextExtractionStrategy.TextChunkLocation
- Since:
- 5.0.2
-
Constructor Summary
ConstructorsConstructorDescriptionTextChunkLocationDefaultImp(Vector startLocation, Vector endLocation, float charSpaceWidth) -
Method Summary
Modifier and TypeMethodDescriptionintfloatComputes the distance between the end of 'other' and the beginning of this chunk in the direction of this chunk's orientation vector.floatfloatintfloatbooleanintboolean
-
Constructor Details
-
TextChunkLocationDefaultImp
-
-
Method Details
-
orientationMagnitude
public int orientationMagnitude()- Specified by:
orientationMagnitudein interfaceLocationTextExtractionStrategy.TextChunkLocation
-
distPerpendicular
public int distPerpendicular()- Specified by:
distPerpendicularin interfaceLocationTextExtractionStrategy.TextChunkLocation
-
distParallelStart
public float distParallelStart()- Specified by:
distParallelStartin interfaceLocationTextExtractionStrategy.TextChunkLocation
-
distParallelEnd
public float distParallelEnd()- Specified by:
distParallelEndin interfaceLocationTextExtractionStrategy.TextChunkLocation
-
getStartLocation
- Specified by:
getStartLocationin interfaceLocationTextExtractionStrategy.TextChunkLocation- Returns:
- the start location of the text
-
getEndLocation
- Specified by:
getEndLocationin interfaceLocationTextExtractionStrategy.TextChunkLocation- Returns:
- the end location of the text
-
getCharSpaceWidth
public float getCharSpaceWidth()- Specified by:
getCharSpaceWidthin interfaceLocationTextExtractionStrategy.TextChunkLocation- Returns:
- the width of a single space character as rendered by this chunk
-
sameLine
- Specified by:
sameLinein interfaceLocationTextExtractionStrategy.TextChunkLocation- Parameters:
as- the location to compare to- Returns:
- true is this location is on the the same line as the other
-
distanceFromEndOf
Computes the distance between the end of 'other' and the beginning of this chunk in the direction of this chunk's orientation vector. Note that it's a bad idea to call this for chunks that aren't on the same line and orientation, but we don't explicitly check for that condition for performance reasons.- Specified by:
distanceFromEndOfin interfaceLocationTextExtractionStrategy.TextChunkLocation- Parameters:
other-- Returns:
- the number of spaces between the end of 'other' and the beginning of this chunk
-
isAtWordBoundary
- Specified by:
isAtWordBoundaryin interfaceLocationTextExtractionStrategy.TextChunkLocation
-
compareTo
- Specified by:
compareToin interfaceComparable<LocationTextExtractionStrategy.TextChunkLocation>
-