The default appearance string (DA) contains any graphics state or text state operators needed to establish the graphics state parameters, such as text size and colour, for displaying the field’s variable text. Only operators that are allowed within text objects shall occur in this string.
Note
This class is not yet public, as its API is still unstable.
| Modifier and Type | Field and Description |
|---|---|
| private static final float | DEFAULT_FONT_SIZE
The default font size used by Acrobat. |
| private final PDResources | |
| private PDFont | |
| private PDColor | |
| private COSName | |
| private float |
| Access | Constructor and Description |
|---|---|
| pack-priv | PDDefaultAppearanceString(COSString
DA entry defaultAppearance, PDResources DR entry defaultResources)Constructor for reading an existing DA string. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | copyNeededResourcesTo(PDAppearanceStream appearanceStream)
Copies any needed resources from the document’s DR dictionary into the stream’s Resources dictionary. |
| pack-priv PDFont | |
| pack-priv PDColor | |
| pack-priv COSName | |
| public float | |
| private void | processAppearanceStringOperators(byte[]
the content to parse. content)Processes the operators of the given content stream. |
| private void | processOperator(Operator
The operation to perform. operator, List<COSBase> The list of arguments. operands)This is used to handle an operation. |
| private void | processSetFont(List<COSBase>
the font name and size operands)Process the set font and font size operator. |
| private void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | writeTo(PDAppearanceContentStream
The content stream. contents, float The calculated font size to use if the /DA string has a size 0
(autosize). Otherwise the size from the /DA string is used. zeroFontSize)Write font name, font size and color from the /DA string to the given content stream. |
| DEFAULT_FONT_SIZE | back to summary |
|---|---|
| private static final float DEFAULT_FONT_SIZE The default font size used by Acrobat. | |
| defaultResources | back to summary |
|---|---|
| private final PDResources defaultResources | |
| font | back to summary |
|---|---|
| private PDFont font | |
| fontColor | back to summary |
|---|---|
| private PDColor fontColor | |
| fontName | back to summary |
|---|---|
| private COSName fontName | |
| fontSize | back to summary |
|---|---|
| private float fontSize | |
| PDDefaultAppearanceString | back to summary |
|---|---|
| pack-priv PDDefaultAppearanceString(COSString defaultAppearance, PDResources defaultResources) throws IOException Constructor for reading an existing DA string.
| |
| copyNeededResourcesTo | back to summary |
|---|---|
| pack-priv void copyNeededResourcesTo(PDAppearanceStream appearanceStream) throws IOException Copies any needed resources from the document’s DR dictionary into the stream’s Resources dictionary. Resources with the same name shall be left intact. | |
| getFont | back to summary |
|---|---|
| pack-priv PDFont getFont() Returns the font. | |
| getFontColor | back to summary |
|---|---|
| pack-priv PDColor getFontColor() Returns the font color | |
| getFontName | back to summary |
|---|---|
| pack-priv COSName getFontName() Get the font name
| |
| getFontSize | back to summary |
|---|---|
| public float getFontSize() Returns the font size. | |
| processAppearanceStringOperators | back to summary |
|---|---|
| private void processAppearanceStringOperators(byte[] content) throws IOException Processes the operators of the given content stream.
| |
| processOperator | back to summary |
|---|---|
| private void processOperator(Operator operator, List<COSBase> operands) throws IOException This is used to handle an operation.
| |
| processSetFont | back to summary |
|---|---|
| private void processSetFont(List<COSBase> operands) throws IOException Process the set font and font size operator.
| |
| processSetFontColor | back to summary |
|---|---|
| private void processSetFontColor(List<COSBase> operands) throws IOException Process the font color operator. This is assumed to be an RGB color.
| |
| setFont | back to summary |
|---|---|
| pack-priv void setFont(PDFont font) Set the font.
| |
| setFontColor | back to summary |
|---|---|
| pack-priv void setFontColor(PDColor fontColor) Set the font color.
| |
| setFontName | back to summary |
|---|---|
| pack-priv void setFontName(COSName fontName) Set the font name.
| |
| setFontSize | back to summary |
|---|---|
| pack-priv void setFontSize(float fontSize) Set the font size.
| |
| writeTo | back to summary |
|---|---|
| pack-priv void writeTo(PDAppearanceContentStream contents, float zeroFontSize) throws IOException Write font name, font size and color from the /DA string to the given content stream.
| |