Breadcrumbs

signoAPI Android – Display DTOs and configuration – Class overview

STViewerRectDTO class

The STViewerRectDTO class is a data object that represents a rectangle on the PDF viewer. The class is part of libSignoPDFSigner.

Property

Description

Rect rectangle

Position specification of the rectangle (default unit of measurement in dp)

int borderColor

Border colour of the rectangle

int backgroundColor

Background colour of the rectangle

Bitmap backgroundImage

Background image of the rectangle

boolean keepAspectRatio

true

Preserve aspect ratio of the rectangle

false

Do not preserve aspect ratio of the rectangle

The position specification of the rectangle can be passed in two different units of measurement. The STViewerRectUnit enumeration is used for this purpose.

The STViewerRectUnit enumeration is defined in the STViewerRectDTO class as follows:

Java
public enum STViewerRectUnit {
    DP,
    PX
}

Value

Description

DP

Position specification of the rectangle in dp (density-independent pixels).

PX

Position specification of the rectangle in pixels.

Usage:

Java
STViewerRectDTO viewerRectDTO = new STViewerRectDTO();
viewerRectDTO.setRectangle(new Rect(10,10,100,100));
Java
 viewerRectDTO.setRectangle(new Rect(10,10,100,100), STViewerRectDTO.STViewerRectUnit.PX);  
Java
viewerRectDTO.setRectangle(new Rect(10,10,100,100), STViewerRectDTO.STViewerRectUnit.DP);

STImageDTO class

The STImageDTO class is a data object that represents an image on a PDF page and its position. The class is part of libSignoPDFSigner.

Property

Description

Bitmap image

Image

STRectDTO rectangle

Position specification of the image within a PDF page

int page

Page specification of the image within a document. The first page number of the document begins with 1.

STRectDTOclass

The STRectDTO class is a data object that represents a rectangle. The class is part of libSignoPDFSigner.

Property

Description

RectF rectangle

Position specification of the rectangle

Unit unit

Unit of measurement of the coordinates

The Unit enumeration is defined as follows:

Java
public enum Unit {
    UnitPoints,
    UnitMilimetres,
    UnitInches
}

Value

Description

UnitPoints

The coordinates are given in points. A PDF document essentially has a resolution of 72 dpi.

UnitMillimetres

The coordinates are given in millimetres.

UnitInches

The coordinates are given in inches.

STNotesConfig class

The STNotesConfig class is a data object that contains the configuration properties for the notes. The class is part of libSignoPDFSigner.

Property

Description

int strokeColor

Pen color of the note.

int strokeWidth

Pen width of the note in dp.

dp = density-independent pixels