List attributes of an XFA Object using Javascript in a PDF

冷暖自知 提交于 2019-12-23 13:15:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!