Package com.itextpdf.kernel.pdf.tagging
Class PdfUserProperty
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.tagging.PdfUserProperty
-
public class PdfUserProperty extends PdfObjectWrapper<PdfDictionary>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PdfUserProperty.ValueType
-
Constructor Summary
Constructors Constructor Description PdfUserProperty(PdfDictionary pdfObject)
PdfUserProperty(java.lang.String name, boolean value)
PdfUserProperty(java.lang.String name, float value)
PdfUserProperty(java.lang.String name, int value)
PdfUserProperty(java.lang.String name, java.lang.String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
java.lang.Boolean
getValueAsBool()
java.lang.Float
getValueAsFloat()
java.lang.String
getValueAsText()
java.lang.String
getValueFormattedRepresentation()
PdfUserProperty.ValueType
getValueType()
java.lang.Boolean
isHidden()
protected boolean
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.PdfUserProperty
setHidden(boolean isHidden)
PdfUserProperty
setName(java.lang.String name)
PdfUserProperty
setValue(boolean value)
PdfUserProperty
setValue(float value)
PdfUserProperty
setValue(int value)
PdfUserProperty
setValue(java.lang.String value)
PdfUserProperty
setValueFormattedRepresentation(java.lang.String formattedRepresentation)
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Constructor Detail
-
PdfUserProperty
public PdfUserProperty(PdfDictionary pdfObject)
-
PdfUserProperty
public PdfUserProperty(java.lang.String name, java.lang.String value)
-
PdfUserProperty
public PdfUserProperty(java.lang.String name, int value)
-
PdfUserProperty
public PdfUserProperty(java.lang.String name, float value)
-
PdfUserProperty
public PdfUserProperty(java.lang.String name, boolean value)
-
-
Method Detail
-
getName
public java.lang.String getName()
-
setName
public PdfUserProperty setName(java.lang.String name)
-
getValueType
public PdfUserProperty.ValueType getValueType()
-
setValue
public PdfUserProperty setValue(java.lang.String value)
-
setValue
public PdfUserProperty setValue(int value)
-
setValue
public PdfUserProperty setValue(float value)
-
setValue
public PdfUserProperty setValue(boolean value)
-
getValueAsText
public java.lang.String getValueAsText()
-
getValueAsFloat
public java.lang.Float getValueAsFloat()
-
getValueAsBool
public java.lang.Boolean getValueAsBool()
-
getValueFormattedRepresentation
public java.lang.String getValueFormattedRepresentation()
-
setValueFormattedRepresentation
public PdfUserProperty setValueFormattedRepresentation(java.lang.String formattedRepresentation)
-
isHidden
public java.lang.Boolean isHidden()
-
setHidden
public PdfUserProperty setHidden(boolean isHidden)
-
isWrappedObjectMustBeIndirect
protected boolean isWrappedObjectMustBeIndirect()
Description copied from class:PdfObjectWrapper
Defines if the object behind this wrapper must be an indirect object in the resultant document.
If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.
Return value of this method shouldn't depend on any logic, it should return always true or false.- Specified by:
isWrappedObjectMustBeIndirect
in classPdfObjectWrapper<PdfDictionary>
- Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-
-