You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/06/30 22:43:05 UTC
[jira] [Created] (PDFBOX-2849) appearance generation for buttons
Tilman Hausherr created PDFBOX-2849:
---------------------------------------
Summary: appearance generation for buttons
Key: PDFBOX-2849
URL: https://issues.apache.org/jira/browse/PDFBOX-2849
Project: PDFBox
Issue Type: Sub-task
Components: AcroForm
Affects Versions: 2.0.0
Reporter: Tilman Hausherr
This code
{code}
PDField newField = tplDoc.getDocumentCatalog().getAcroForm().getField("01.20.Entry1");
PDCheckbox newCheckBoxField = (PDCheckbox) newField;
newCheckBoxField.check();
{code}
brings this exception:
{code}
Exception in thread "main" java.lang.UnsupportedOperationException: not implemented
at org.apache.pdfbox.pdmodel.interactive.form.PDButton.constructAppearances(PDButton.java:225)
at org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:220)
at org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox.setValue(PDCheckbox.java:128)
at org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox.check(PDCheckbox.java:71)
{code}
what did work (although not for every checkbox) is this:
{code}
newCheckBoxField.getCOSObject().setItem(COSName.V, vValue);
newCheckBoxField.getCOSObject().setItem(COSName.AS, asValue);
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org