Compartilhar via


LengthUnit Class

public final class LengthUnit
extends ExpandableStringEnum<LengthUnit>

The unit used by the width, height, and polygon properties. For images, the unit is "pixel". For PDF, the unit is "inch".

Field Summary

Modifier and Type Field and Description
static final LengthUnit INCH

Length unit for PDF files.

static final LengthUnit PIXEL

Length unit for image files.

Constructor Summary

Constructor Description
LengthUnit()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of LengthUnit value.

Method Summary

Modifier and Type Method and Description
static LengthUnit fromString(String name)

Creates or finds a LengthUnit from its string representation.

static Collection<LengthUnit> values()

Gets known LengthUnit values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

INCH

public static final LengthUnit INCH

Length unit for PDF files.

PIXEL

public static final LengthUnit PIXEL

Length unit for image files.

Constructor Details

LengthUnit

@Deprecated
public LengthUnit()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of LengthUnit value.

Method Details

fromString

public static LengthUnit fromString(String name)

Creates or finds a LengthUnit from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding LengthUnit.

values

public static Collection values()

Gets known LengthUnit values.

Returns:

known LengthUnit values.

Applies to