Im setting the value of a combo box in the pdf file.. but the selected value does not change.. what would i do so that when changing the value of a combo box it also change the selected text of a combo box depends on the value which is set.
Im setting the value using this code:
But notthing happen to the selected value after saving..
can you help me with this.
Hope for immediate response.
What exactly do you mean with "nothing happened to the saved value". Do you mean that the "/V" entry in the PDF object remains unchanged (which would be a bug - but seems unbelievable). You can check that with a simple unit test or a COS browser utillity like the one included in CABAReT Stage.
Or that you open the document with a viewer and see the visual appearance unchanged (which is the actual behavior - and is described in some of the other forum entries).
Summary: the form objects have a "value", represented by the "/V" that is manipulated by "setValue". And form objects have an appearance, stored in an associated annotations content stream. If you want another appearance, you must change the annotation, too.
As there are still many (many, many) more issues waiting when dealing with acro forms, we recommend using the IFormHandler abstraction to do so.
BUT: The appearance is not re-created in this process as currently there is no IAppearanceCreator registered for the widget annotation types - it should simply be cleared. You could write and register an appearance creator or use the "setNeedAppearances" flag to force recreation by the viewer application.
Im setting the combo box value programaticaly. and save it as another file, but the output file wont change its selected value to the one i set.
i can't help you if you don't answer the questions. i understood that you do it programmatically. But you have to report me if the effect is
a) /V is not changed
b) appearance is not changed
i can reckon you mean b) and then the above explanation WHY it is not changed applies.
Log in to post a comment.