PdfValue

class PdfValue

This represents a value stored inside a PDF document stream. The PDF has a few different data types of values that are reasonably interchangeable. The type can be retrieved with getType and can be one of PdfValueType.

When creating a new value, the type will be automatically set depending on the constructor parameter.

Constructors

Link copied to clipboard
constructor(longValue: Long)
Creates a new PDF value of INTEGER type.
constructor(doubleValue: Double)
Creates a new PDF value of DOUBLE type.
constructor(booleanValue: Boolean)
Creates a new PDF value of BOOLEAN type.
constructor(@NonNull stringValue: String)
Creates a new PDF value of STRING type.
constructor(@NonNull listValue: List<PdfValue>)
Creates a new PDF value of ARRAY type.
constructor(@NonNull mapValue: Map<String, PdfValue>)
Creates a new PDF value of DICTIONARY type.
constructor()
Creates a new PDF value of NULLOBJ type.

Types

Link copied to clipboard
Type of a value stored in the PDF document stream.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun getArray(): List<PdfValue>
Gets the stored List of PdfValues or null if the value isn't an array.
Link copied to clipboard
open fun getBoolean(): Boolean
Gets the stored Boolean value or false if the value isn't a boolean.
Link copied to clipboard
Gets the stored Map of String and PdfValues, or null if the value isn't a dictionary.
Link copied to clipboard
open fun getDouble(): Double
Gets the stored Double value or 0.0 if the value isn't a double.
Link copied to clipboard
open fun getLong(): Long
Gets the stored Long value or 0 if the value isn't an integer.
Link copied to clipboard
open fun getString(): String
Gets the stored String value or null if the value isn't a string.
Link copied to clipboard
open fun toString(): String