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 classPdfUserProperty.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.StringgetName()java.lang.BooleangetValueAsBool()java.lang.FloatgetValueAsFloat()java.lang.StringgetValueAsText()java.lang.StringgetValueFormattedRepresentation()PdfUserProperty.ValueTypegetValueType()java.lang.BooleanisHidden()protected booleanisWrappedObjectMustBeIndirect()Defines if the object behind this wrapper must be an indirect object in the resultant document.PdfUserPropertysetHidden(boolean isHidden)PdfUserPropertysetName(java.lang.String name)PdfUserPropertysetValue(boolean value)PdfUserPropertysetValue(float value)PdfUserPropertysetValue(int value)PdfUserPropertysetValue(java.lang.String value)PdfUserPropertysetValueFormattedRepresentation(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:PdfObjectWrapperDefines 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:
isWrappedObjectMustBeIndirectin classPdfObjectWrapper<PdfDictionary>- Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-
-