问题
I'm trying to create a PDF document with several text fields that can grow in height up to some maximum value. Due to the constraints of the project, I'm using Adobe Designer 7, which happily allows Javascript. However, the objects in XFA are a little different from the HTML DOM or earlier PDF DOMs.
So, I know for certain that my field, TextField1, has certain attributes, such as "h", which controls the height.
The code below only lists the methods on TextField1, but not the attributes:
----- form1.Page1.TextField1::exit - (JavaScript, client) -----
for(var i in xfa.form.form1.Page1.TextField1) {
try {
console.println(i);
} catch(e) {}
}
Why is that? (And, how do I fix it so it does list the attributes?)
Something quite similar to the code above was working, but I lost the snippet out of negligence and a very short undo-stack.
回答1:
I don't have the answer to the question of how to enumerate the attributes, but you will find a complete list of the supported ones here:
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/livecycle/pdfs/Adobe_XML_Form_Object_Model_Reference.pdf
来源:https://stackoverflow.com/questions/480167/list-attributes-of-an-xfa-object-using-javascript-in-a-pdf