We are trying to resize an annotation but nothing happens

13 views
Skip to first unread message

Ryan

unread,
Sep 2, 2016, 1:51:25 PM9/2/16
to PDFTron PDFNet SDK
Question:

We've tried to change annotation size (in Android version) in such a way:

private void IncreaseRect(Annot annot, int currentPageNumber)
{
   
if (annot.GetType() != Annot.Type.e_FreeText)
       
return;
 
   
var currentRect = annot.GetRect();
   
var increasedRect = new Rect(currentRect.x1, currentRect.y1, currentRect.x2, currentRect.y2);
    increasedRect
.x2 += 50;
    annot
.SetRect(increasedRect);
 
    _pdfViewCtrl
.Update(annot, currentPageNumber);
}


But text stretched instead of reorder existing text in new annotation rectangle.

Answer:

After calling SetRect, please call 
annot.RefreshAppearance()



Reply all
Reply to author
Forward
0 new messages