How to fixed free text annotation position

Hi,
I am creating free text annot using below code sample (in java). If i open this pdf in some pdf viewer, i can move this free text. Is there any way to fixed this free text position so that i cannot move this free text in any pdf viewer?

        FreeText textAnnot = FreeText.create(doc, widget.getRect());
        String contents = "Content goes here";
        textAnnot.setUniqueID("12345");
        textAnnot.setFontName("Courier");
        textAnnot.setFontSize(9);
        textAnnot.setContents(contents);
        textAnnot.setTextColor(new ColorPt(), 1);
        textAnnot.setLineColor(new ColorPt(), 1);
1 Like

Hi Imran,

Do you still require the free text to remain an annotation? If not, you can simply flatten the annotations down and this will prevent it from being movable in any pdf viewer. Please see the documentation for more info:
https://docs.apryse.com/api/PDFTronSDK/dotnet/pdftron.PDF.Annot.html#pdftron_PDF_Annot_Flatten_pdftron_PDF_Page_

1 Like