[
https://issues.apache.org/jira/browse/PDFBOX-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15430968#comment-15430968
]
ASF subversion and git services commented on PDFBOX-3470:
---------------------------------------------------------
Commit 1757202 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1757202 ]
PDFBOX-3470: improve example with non standard text, border and background color
> Set border and background color in AcroForm field appearance
> ------------------------------------------------------------
>
> Key: PDFBOX-3470
> URL: https://issues.apache.org/jira/browse/PDFBOX-3470
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 2.0.1, 2.0.2, 2.0.3
> Reporter: Tilman Hausherr
> Fix For: 2.0.3, 2.1.0
>
>
> Follow-up on PDFBOX-2918 - set border and background color so that the
> CreateSimpleForm.java example can be improved with this code, which I've had
> for some time and forgot to commit:
> {code}
> // set green border and yellow background
> // if you prefer defaults, just delete this code block
> PDAppearanceCharacteristicsDictionary fieldAppearance
> = new PDAppearanceCharacteristicsDictionary(new
> COSDictionary());
> fieldAppearance.setBorderColour(new PDColor(new float[]{0,1,0},
> PDDeviceRGB.INSTANCE));
> fieldAppearance.setBackground(new PDColor(new float[]{1,1,0},
> PDDeviceRGB.INSTANCE));
> widget.setAppearanceCharacteristics(fieldAppearance);
> {code}
> without needing to call {{acroForm.setNeedAppearances(true);}}. While looking
> at it, I also found a bug in the current code, the border color is set with
> the non stroking color.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]