addLine

public final PdfLineAnnotation addLine(float startX, float startY, float endX, float endY, String author, String contents)

Adds a line annotation to this page. The annotation is created with default styling (1pt black line with no line endings). Use the returned annotation's properties to customize line width, color, and line endings.

Return

The newly created .

Parameters

startX

X coordinate of the line start point in points.

startY

Y coordinate of the line start point in points.

endX

X coordinate of the line end point in points.

endY

Y coordinate of the line end point in points.

author

The author of the annotation.

contents

The text contents/comment for the annotation.

Throws

Thrown when no page is loaded.

Thrown when the operation fails.