|
@@ -2587,7 +2587,11 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
((CPDFFreeTextAnnotation *)annotation).color = NSColor.whiteColor;
|
|
|
|
|
|
if (toolbarType == CSToolbarTypeText) {
|
|
|
-
|
|
|
+ originalBounds = [annotation bounds];
|
|
|
+ NSRect newBounds = [self getValidFreetText:((CPDFFreeTextAnnotation *)annotation) rect:originalBounds];
|
|
|
+ originalBounds.size.width = newBounds.size.width;
|
|
|
+ originalBounds.size.height = newBounds.size.height;
|
|
|
+ annotation.bounds = originalBounds;
|
|
|
} else if (toolbarType == CSToolbarTypeDateText) {
|
|
|
((CPDFFreeTextAnnotation *)annotation).contents = self.customStampTextValue;
|
|
|
((CPDFFreeTextAnnotation *)annotation).customStampAnnotationType = @"dateText";
|
|
@@ -3899,7 +3903,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
[style setAlignment:freeTextAn.alignment];
|
|
|
[dictionary setObject:style forKey:NSParagraphStyleAttributeName];
|
|
|
|
|
|
- CGSize textViewSize = [freeTextAn.contents?:@"" boundingRectWithSize:CGSizeMake(rect.size.width, MAXFLOAT)
|
|
|
+ CGSize textViewSize = [freeTextAn.contents?:@" " boundingRectWithSize:CGSizeMake(rect.size.width, MAXFLOAT)
|
|
|
options:NSStringDrawingUsesLineFragmentOrigin
|
|
|
attributes:dictionary].size;
|
|
|
|