Adobe 表单中的今天日期
我正在使用 Acrobat X Pro,并且希望以今天的日期打开我的表单。我很难找到适用于 Acrobat X 的脚本。感谢任何帮助。
我在 2010 年 7 月找到了 Paque 的回复: 删除脚本并将其替换为以下文档 javascript:
var f = this.getField("wells_datefield"); if (!f.value) f.value = util.printd("m/d/yyyy", new Date());保存您的表格并打开它,日期应该就在其中弹出。
在制作文档 javascript 时,请记住不要将其放在函数中。一种方法如下。在 Acrobat 菜单中:
高级 -> 文档处理 -> 文档 Javascript... 在弹出的对话框中,输入脚本名称(例如“populate_date”),然后单击添加... 在弹出的脚本对话框中:删除所有内容(“function populate_date(){}”)并粘贴到上面的脚本中。 单击“确定”,然后单击“关闭”。 保存表单,关闭它并重新打开它。 没有第6步! :>
我没有高级 - 文档处理选项.....
9/2:您好..我还能说些什么来帮助更有效地解释我的问题吗?
I'm using Acrobat X Pro and would like my form to open with today's date. I am having a hard time finding a script that works in Acrobat X. Appreciate any help.
I found this response by Paque in July 2010:
Remove your script and replace it with the following document javascript:
var f = this.getField("wells_datefield"); if (!f.value) f.value = util.printd ("m/d/yyyy", new Date()); Save your form and open it, and the date should pop right in there.
When making the document javascript, remember to not put it inside a function. One way of doing that is the following. In the Acrobat menu:
Advanced->Document Processing->Document Javascripts...
In the dialog that pops up, enter a Script Name (for instance "populate_date") and click Add...
In the script dialog that pops up: REMOVE everything ("function populate_date(){}") and paste in the script above.
Click ok, then Close.
Save the form, close it and reopen it.
There is no step 6! :>
I don't have the option of Advanced - Document Processing .....
9/2: Hi there.. is there something else I can say that might help explain my problem more effectively?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要添加 JavaScript 工具...当您单击“工具”时,会出现一个小菜单图标,旁边有一个向下箭头。单击并选择 JavaScript。它将加载工具集..
You need to add the JavaScript tool...When you click Tools there is a small menu icon with a down arrow next to it.. Click and select JavaScript. It will load the toolset..
我知道这个问题的回答有点晚了。这是使该脚本正常工作的方法。该脚本用于在您每次打开此 pdf 时自动输入计算机上的日期。
您拥有的脚本:
var f = this.getField("wells_datefield"); if (!f.value) f.value = util.printd("m/d/yyyy", new Date())
表示日期字段名为 'wells_datefield' 日期格式将为 m/日/年。您可以通过更改格式(例如 d mmmm yyyy)来更改日期的显示方式。要在 pdf 中输入此脚本,请执行以下操作。
I know this is a late response for this question. Here is a way to get this script to work properly. This script is used to automatically input the date that is on your computer each time you open this pdf.
The script that you have:
var f = this.getField("wells_datefield"); if (!f.value) f.value = util.printd ("m/d/yyyy", new Date())
is stating that the date field is called 'wells_datefield' The date format will be m/d/yyyy. You can change the way the date is shown by changing the format such as d mmmm yyyy. To enter this script in your pdf, do the following actions.