Skip to content

Annotation Rotation

Annotation rotation provides rotation functionality for standard stamp annotations, custom stamp annotations, image annotations, and electronic signature annotations.

When you select a stamp or signature annotation in the CPDFReaderView, you can obtain the annotation object through the context menu and enable the rotation feature to manually rotate the annotation.

java
public class CPDFContextMenuHelper extends CPDFContextMenuShowHelper {
  
@Override
    public View getStampContentView(CPDFPageView cpdfPageView, CPDFBaseAnnotImpl cpdfBaseAnnot, LayoutInflater layoutInflater{ 
        ((CPDFStampAnnotImpl) cpdfBaseAnnot).setEnableRotate(true);
        return view;
    }
}
kotlin
 class CPDFContextMenuHelper(p0: CPDFReaderView?) : CPDFContextMenuShowHelper(p0) {
     override fun getStampContentView(
         cpdfPageView: CPDFPageView?,
         cpdfBaseAnnot: CPDFBaseAnnotImpl<*>?,
         layoutInflater : LayoutInflater?
     ): View {
         (cpdfBaseAnnot as CPDFStampAnnotImpl).setEnableRotate(true)
         return view
     }
}