-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Sometimes on rotated pdf files the textMatrix.a is 0.
An example is here: http://94.23.146.173/ficheros/d412df0c4d6c05406e5dd5757ea63ae1.pdf
In these cases, we need to return the vertical.
CGFloat vertical(CGAffineTransform transform) {
return transform.ty / transform.b;
}
- (CGFloat)width {
CGFloat a = self.finalState.textMatrix.a;
CGFloat a2 = self.initialState.textMatrix.a;
if (a == 0 || a2 == 0)
return vertical(self.finalState.textMatrix) - vertical(self.initialState.textMatrix);
else
return horizontal(self.finalState.textMatrix) - horizontal(self.initialState.textMatrix);
}
Metadata
Metadata
Assignees
Labels
No labels