| Modifier and Type | Field and Description |
|---|---|
| private static final Operator | |
| private static final float | DEFAULT_FONT_SIZE
The default font size used for multiline text |
| private static final float | DEFAULT_PADDING
The default padding applied by Acrobat to the fields bbox. |
| private PDDefaultAppearanceString | |
| private static final Operator | |
| private final PDVariableText | |
| private static final int | FONTSCALE
The scaling factor for font units to PDF units |
| private static final float[] | HIGHLIGHT_COLOR
The highlight color The color setting is used by Adobe to display the highlight box for selected entries in a list box. |
| private static final Log | |
| private static final float | |
| private static final float | MINIMUM_FONT_SIZE
The minimum/maximum font sizes used for multiline text auto sizing |
| private String |
| Access | Constructor and Description |
|---|---|
| pack-priv | AppearanceGeneratorHelper(PDVariableText
the field which you wish to control the appearance of field)Constructs a COSAppearance from the given field. |
| Modifier and Type | Method and Description |
|---|---|
| private PDRectangle | |
| private float | Returns: the calculated font-sizeMy "not so great" method for calculating the fontsize. |
| private AffineTransform | |
| private String | |
| private int | |
| private PDDefaultAppearanceString | |
| private void | initializeAppearanceContent(PDAnnotationWidget
the field widget widget, PDAppearanceCharacteristicsDictionary the appearance characteristics dictionary from the widget or
null appearanceCharacteristics, PDAppearanceStream the appearance stream to be used appearanceStream)Initialize the content of the appearance stream. |
| private void | insertGeneratedAppearance(PDAnnotationWidget widget, PDAppearanceStream appearanceStream, OutputStream output)
Generate and insert text content and clipping around it. |
| private void | insertGeneratedCombAppearance(PDAppearanceContentStream
the content stream to write to contents, PDAppearanceStream the appearance stream used appearanceStream, PDFont the font to be used font, float the font size to be used fontSize)Generate the appearance for comb fields. |
| private void | insertGeneratedListboxAppearance(PDAppearanceContentStream contents, PDAppearanceStream appearanceStream, PDRectangle contentRect, PDFont font, float fontSize)
|
| private void | insertGeneratedListboxSelectionHighlight(PDAppearanceContentStream contents, PDAppearanceStream appearanceStream, PDFont font, float fontSize)
|
| private boolean | |
| private static boolean | |
| private PDAppearanceStream | |
| private PDRectangle | Returns: the resolved boundingBox.the annotation widget. fieldWidget, PDAppearanceStream the annotations appearance stream. appearanceStream)Resolve the bounding box. |
| private float | |
| private float | |
| private float | |
| private int | |
| private void | setAppearanceContent(PDAnnotationWidget widget, PDAppearanceStream appearanceStream)
Constructs and sets new contents for given appearance stream. |
| public void | setAppearanceValue(String
the String value which the appearance should represent apValue)This is the public method for setting the appearance stream. |
| private boolean | |
| private void | |
| private void | writeToStream(byte[] data, PDAppearanceStream appearanceStream)
Writes the stream to the actual stream in the COSStream. |
| BMC | back to summary |
|---|---|
| private static final Operator BMC | |
| DEFAULT_FONT_SIZE | back to summary |
|---|---|
| private static final float DEFAULT_FONT_SIZE The default font size used for multiline text | |
| DEFAULT_PADDING | back to summary |
|---|---|
| private static final float DEFAULT_PADDING The default padding applied by Acrobat to the fields bbox. | |
| defaultAppearance | back to summary |
|---|---|
| private PDDefaultAppearanceString defaultAppearance | |
| EMC | back to summary |
|---|---|
| private static final Operator EMC | |
| field | back to summary |
|---|---|
| private final PDVariableText field | |
| FONTSCALE | back to summary |
|---|---|
| private static final int FONTSCALE The scaling factor for font units to PDF units | |
| HIGHLIGHT_COLOR | back to summary |
|---|---|
| private static final float[] HIGHLIGHT_COLOR The highlight color The color setting is used by Adobe to display the highlight box for selected entries in a list box. Regardless of other settings in an existing appearance stream Adobe will always use this value. | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| MAXIMUM_FONT_SIZE | back to summary |
|---|---|
| private static final float MAXIMUM_FONT_SIZE | |
| MINIMUM_FONT_SIZE | back to summary |
|---|---|
| private static final float MINIMUM_FONT_SIZE The minimum/maximum font sizes used for multiline text auto sizing | |
| value | back to summary |
|---|---|
| private String value | |
| AppearanceGeneratorHelper | back to summary |
|---|---|
| pack-priv AppearanceGeneratorHelper(PDVariableText field) throws IOException Constructs a COSAppearance from the given field.
| |
| applyPadding | back to summary |
|---|---|
| private PDRectangle applyPadding(PDRectangle box, float padding) Apply padding to a box.
| |
| calculateFontSize | back to summary |
|---|---|
| private float calculateFontSize(PDFont font, PDRectangle contentRect) throws IOException My "not so great" method for calculating the fontsize. It does not work superb, but it handles ok.
| |
| calculateMatrix | back to summary |
|---|---|
| private AffineTransform calculateMatrix(PDRectangle bbox, int rotation) | |
| getFormattedValue | back to summary |
|---|---|
| private String getFormattedValue(String apValue) | |
| getTextAlign | back to summary |
|---|---|
| private int getTextAlign(PDAnnotationWidget widget) | |
| getWidgetDefaultAppearanceString | back to summary |
|---|---|
| private PDDefaultAppearanceString getWidgetDefaultAppearanceString(PDAnnotationWidget widget) throws IOException | |
| initializeAppearanceContent | back to summary |
|---|---|
| private void initializeAppearanceContent(PDAnnotationWidget widget, PDAppearanceCharacteristicsDictionary appearanceCharacteristics, PDAppearanceStream appearanceStream) throws IOException Initialize the content of the appearance stream. Get settings like border style, border width and colors to be used to draw a rectangle and background color around the widget
| |
| insertGeneratedAppearance | back to summary |
|---|---|
| private void insertGeneratedAppearance(PDAnnotationWidget widget, PDAppearanceStream appearanceStream, OutputStream output) throws IOException Generate and insert text content and clipping around it. | |
| insertGeneratedCombAppearance | back to summary |
|---|---|
| private void insertGeneratedCombAppearance(PDAppearanceContentStream contents, PDAppearanceStream appearanceStream, PDFont font, float fontSize) throws IOException Generate the appearance for comb fields.
| |
| insertGeneratedListboxAppearance | back to summary |
|---|---|
| private void insertGeneratedListboxAppearance(PDAppearanceContentStream contents, PDAppearanceStream appearanceStream, PDRectangle contentRect, PDFont font, float fontSize) throws IOException | |
| insertGeneratedListboxSelectionHighlight | back to summary |
|---|---|
| private void insertGeneratedListboxSelectionHighlight(PDAppearanceContentStream contents, PDAppearanceStream appearanceStream, PDFont font, float fontSize) throws IOException | |
| isMultiLine | back to summary |
|---|---|
| private boolean isMultiLine() | |
| isValidAppearanceStream | back to summary |
|---|---|
| private static boolean isValidAppearanceStream(PDAppearanceEntry appearance) | |
| prepareNormalAppearanceStream | back to summary |
|---|---|
| private PDAppearanceStream prepareNormalAppearanceStream(PDAnnotationWidget widget) | |
| resolveBoundingBox | back to summary |
|---|---|
| private PDRectangle resolveBoundingBox(PDAnnotationWidget fieldWidget, PDAppearanceStream appearanceStream) Resolve the bounding box.
| |
| resolveCapHeight | back to summary |
|---|---|
| private float resolveCapHeight(PDFont font) throws IOException | |
| resolveDescent | back to summary |
|---|---|
| private float resolveDescent(PDFont font) throws IOException | |
| resolveGlyphHeight | back to summary |
|---|---|
| private float resolveGlyphHeight(PDFont font, int code) throws IOException | |
| resolveRotation | back to summary |
|---|---|
| private int resolveRotation(PDAnnotationWidget widget) | |
| setAppearanceContent | back to summary |
|---|---|
| private void setAppearanceContent(PDAnnotationWidget widget, PDAppearanceStream appearanceStream) throws IOException Constructs and sets new contents for given appearance stream. | |
| setAppearanceValue | back to summary |
|---|---|
| public void setAppearanceValue(String apValue) throws IOException This is the public method for setting the appearance stream.
| |
| shallComb | back to summary |
|---|---|
| private boolean shallComb() Determine if the appearance shall provide a comb output. May be set only if the MaxLen entry is present in the text field dictionary and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.
| |
| validateAndEnsureAcroFormResources | back to summary |
|---|---|
| private void validateAndEnsureAcroFormResources() | |
| writeToStream | back to summary |
|---|---|
| private void writeToStream(byte[] data, PDAppearanceStream appearanceStream) throws IOException Writes the stream to the actual stream in the COSStream.
| |