使用PDF中的Javascript列出XFA对象的属性 [英] List attributes of an XFA Object using Javascript in a PDF

查看:113
本文介绍了使用PDF中的Javascript列出XFA对象的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个具有多个文本字段的PDF文档,这些文本字段的高度可以增加到一些最大值.由于项目的限制,我使用的是Adobe Designer 7,它很高兴使用Javascript.但是,XFA中的对象与HTML DOM或更早的PDF DOM略有不同.

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.

因此,我肯定知道我的字段TextField1具有某些属性,例如"h",它可以控制高度.

So, I know for certain that my field, TextField1, has certain attributes, such as "h", which controls the height.

下面的代码仅列出TextField1上的方法,但没有列出属性:

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.

推荐答案

对于如何枚举属性的问题,我没有答案,但是您可以在此处找到受支持属性的完整列表:

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/Adob​​e/en/devnet/livecycle/pdfs/Adob​​e_XML_Form_Object_Model_Reference.pdf

这篇关于使用PDF中的Javascript列出XFA对象的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆