public class

Stamper

extends Tool
java.lang.Object
   ↳ com.pdftron.pdf.tools.Tool
     ↳ com.pdftron.pdf.tools.Stamper
Known Direct Subclasses

Class Overview

This class is for creating stamp annotation.

Summary

Constants
String STAMPER_ROTATION_DEGREE_ID
String STAMPER_ROTATION_ID
[Expand]
Inherited Constants
From class com.pdftron.pdf.tools.Tool
[Expand]
Inherited Fields
From class com.pdftron.pdf.tools.Tool
Public Constructors
Stamper(PDFViewCtrl ctrl)
Class constructor
Public Methods
void addStampFromClipboard(PointF targetPoint)
adds image stamp from clipboard in the specific location.
void clearTargetPoint()
The overload implementation of clearTargetPoint().
boolean createImageStamp(Uri uri, int imageRotation, String filePath)
Creates an image stamp.
int getCreateAnnotType()
Gets what annotation type this tool can create
ToolManager.ToolModeBase getToolMode()
The overload implementation of getToolMode().
void onCreate()
The overload implementation of onCreate().
boolean onQuickMenuClicked(QuickMenuItem menuItem)
The overload implementation of onQuickMenuClicked(QuickMenuItem).
boolean onSingleTapConfirmed(MotionEvent e)
The overload implementation of onSingleTapConfirmed(MotionEvent).
boolean onUp(MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)
The overload implementation of onUp(MotionEvent, PDFViewCtrl.PriorEventMode).
void setTargetPoint(PointF targetPoint, boolean createImageStamp)
Sets the target point.
[Expand]
Inherited Methods
From class com.pdftron.pdf.tools.Tool
From class java.lang.Object
From interface com.pdftron.pdf.tools.ToolManager.Tool

Constants

public static final String STAMPER_ROTATION_DEGREE_ID

Constant Value: "pdftronImageStampRotationDegree"

public static final String STAMPER_ROTATION_ID

Constant Value: "pdftronImageStampRotation"

Public Constructors

public Stamper (PDFViewCtrl ctrl)

Class constructor

Public Methods

public void addStampFromClipboard (PointF targetPoint)

adds image stamp from clipboard in the specific location.

Parameters
targetPoint The target point to add image stamp

public void clearTargetPoint ()

The overload implementation of clearTargetPoint().

public boolean createImageStamp (Uri uri, int imageRotation, String filePath)

Creates an image stamp.

Parameters
uri The URI
imageRotation The image rotation (e.g. 0, 90, 180, 270)
filePath The file path
Returns
  • True if an image stamp is created

public int getCreateAnnotType ()

Gets what annotation type this tool can create

Returns
  • annot type for annotation creation tool, or unknown for non-creation tool.

public ToolManager.ToolModeBase getToolMode ()

The overload implementation of getToolMode().

Returns
  • the mode/identifier of this tool.

public void onCreate ()

The overload implementation of onCreate().

public boolean onQuickMenuClicked (QuickMenuItem menuItem)

The overload implementation of onQuickMenuClicked(QuickMenuItem).

Parameters
menuItem The clicked menu item.
Returns
  • True if handled

public boolean onSingleTapConfirmed (MotionEvent e)

The overload implementation of onSingleTapConfirmed(MotionEvent).

public boolean onUp (MotionEvent e, PDFViewCtrl.PriorEventMode priorEventMode)

The overload implementation of onUp(MotionEvent, PDFViewCtrl.PriorEventMode).

public void setTargetPoint (PointF targetPoint, boolean createImageStamp)

Sets the target point.

Parameters
targetPoint The target point
createImageStamp True if should create image stamp