Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.annotation

public Class PDBorderStyleDictionary

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSDictionary, .COSArray, .COSInteger, .COSName, org.apache.pdfbox.pdmodel.common.COSObjectable, org.apache.pdfbox.pdmodel.graphics.PDLineDashPattern

This class represents a PDF /BS entry the border style dictionary.
Author
Paul King

Field Summary

Modifier and TypeField and Description
private final COSDictionary
public static final String
STYLE_BEVELED

Constant for the name of a beveled style.

public static final String
STYLE_DASHED

Constant for the name of a dashed style.

public static final String
STYLE_INSET

Constant for the name of a inset style.

public static final String
STYLE_SOLID

Constant for the name of a solid style.

public static final String
STYLE_UNDERLINE

Constant for the name of a underline style.

Constructor Summary

AccessConstructor and Description
public
public
PDBorderStyleDictionary(COSDictionary
a border style dictionary.
dict
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public COSDictionary

Returns:

the dictionary
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

returns the dictionary.

public PDLineDashPattern

Returns:

the dash style of the border
getDashStyle
()

This will retrieve the dash style used for drawing the border.

public String

Returns:

the style of the border
getStyle
()

This will retrieve the border style, see the STYLE_* constants for valid values.

public float

Returns:

The width of the border in points.
getWidth
()

This will retrieve the border width in points, 0 = no border.

public void
setDashStyle(COSArray
the dash style to use
dashArray
)

This will set the dash style used for drawing the border.

public void
setStyle(String
the border style to use
s
)

This will set the border style, see the STYLE_* constants for valid values.

public void
setWidth(float
float the width in points
w
)

This will set the border width in points, 0 = no border.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dictionaryback to summary
private final COSDictionary dictionary
STYLE_BEVELEDback to summary
public static final String STYLE_BEVELED

Constant for the name of a beveled style.

STYLE_DASHEDback to summary
public static final String STYLE_DASHED

Constant for the name of a dashed style.

STYLE_INSETback to summary
public static final String STYLE_INSET

Constant for the name of a inset style.

STYLE_SOLIDback to summary
public static final String STYLE_SOLID

Constant for the name of a solid style.

STYLE_UNDERLINEback to summary
public static final String STYLE_UNDERLINE

Constant for the name of a underline style.

Constructor Detail

PDBorderStyleDictionaryback to summary
public PDBorderStyleDictionary()

Constructor.

PDBorderStyleDictionaryback to summary
public PDBorderStyleDictionary(COSDictionary dict)

Constructor.

Parameters
dict:COSDictionary

a border style dictionary.

Method Detail

getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

returns the dictionary.

Returns:COSDictionary

the dictionary

Annotations
@Override
getDashStyleback to summary
public PDLineDashPattern getDashStyle()

This will retrieve the dash style used for drawing the border.

Returns:PDLineDashPattern

the dash style of the border

getStyleback to summary
public String getStyle()

This will retrieve the border style, see the STYLE_* constants for valid values.

Returns:String

the style of the border

getWidthback to summary
public float getWidth()

This will retrieve the border width in points, 0 = no border.

Returns:float

The width of the border in points.

setDashStyleback to summary
public void setDashStyle(COSArray dashArray)

This will set the dash style used for drawing the border.

Parameters
dashArray:COSArray

the dash style to use

setStyleback to summary
public void setStyle(String s)

This will set the border style, see the STYLE_* constants for valid values.

Parameters
s:String

the border style to use

setWidthback to summary
public void setWidth(float w)

This will set the border width in points, 0 = no border. There is a bug in Adobe Reader DC, float values are ignored for text field widgets. As a workaround, floats that are integers (e.g. 2.0) are written as integer in the PDF.

In Adobe Acrobat DC, the values are shown as "0 = Invisible, 1 = Thin, 2 = Medium, 3 = Thick" for widget and link annotations.

Parameters
w:float

float the width in points