Hi, I'm trying to add some metadata to a pdf. I have the follow script in the form initialize event:
if (form1.desc.nodes.namedItem("metadata") == null) then
var oNode=xfa.form.createNode("text", "metadata")
form1.desc.nodes.append(oNode)
endif
I receive the error message:
Argument mismatch in property or function argument
I also tried this code:
if (form1.desc.nodes.namedItem("metadata") == null) then
var oNode=xfa.form.createNode("text", "metadata")
oNode.value = "Test Data"
form1.desc.nodes.append(oNode)
endif
Which gave me this error:
accessor "oNode.value" is unknown
It appears that the oNode object is not being created.
Any suggesting how I can add Metadata to the PDF?
Bruce / Zwicki - or anyone who can assit...
How did you get this to work?
I'm looking for a way to add/inject values (keywords) into the form's meta-data by retrieving the values from user input.
To test the above solution, I added the following script to the initialize event as referenced, but I'm not sure what is happening:
if (form1.desc.nodes.namedItem("metadata") == null)
{
var oNode=xfa.form.createNode("text", "metadata")
form1.desc.nodes.append(oNode)
}
1. Do I need a field on the page?
2. What part of the above script affects the meta-data?
Thanks!
Hi,
This is the code I use to place metadata into the pdf file. If you open
the resulting pdf file using Notepad, the metadata is visible as readable
text in the file. I'm not sure the same approach can be used to add
metadata as viewed under Document Properties. We are not using it that
way. Maybe by changing the node name?
if ((EMAIL_SUBJECT1.rawValue != "")&&(EMAIL_SUBJECT1.rawValue != null))
{
var vDesc=xfa.template.data.desc;
var oNode1=xfa.template.createNode("text", "EMAIL_SUBJECT1");
vDesc.nodes.append(oNode1);
vDesc.nodes.namedItem("EMAIL_SUBJECT1").value=EMAIL_SUBJECT1.rawValue ;
}
Andrew Zwickl | Worldwide Information Systems |
Eastman Kodak Company | 1669 Lake Ave | Rochester, NY 14652-4455 |
VOX: 585-477-1402
FAX: 585-588-4123
EMail: andrew.zwickl@kodak.com
www.kodak.com
From:
SI_MSD7 <forums@adobe.com>
To:
zwickl <andrew.zwickl@kodak.com>
Date:
08/10/2012 06:18 PM
Subject:
Re: Adding Metadata to PDF Form Adding Metadata to PDF Form
Re: Adding Metadata to PDF Form
created by SI_MSD7 in LiveCycle Designer - View the full discussion
Bruce / Zwicki - or anyone who can assit...
How did you get this to work? I
I'm looking for a way to add/inject values (keywords) into the form's
meta-data by retrieving the info/values from user input.
To test the above solution, I added the following script to the initialize
event as referenced, but I'm not sure what is happening:
if (form1.desc.nodes.namedItem("metadata") == null)
{
var oNode=xfa.form.createNode("text", "metadata")
form1.desc.nodes.append(oNode)
}
1. Do I need a field on the page?
2. What part of the above script affects the meta-data?
Thanks!
Replies to this message go to everyone subscribed to this thread, not
directly to the person who posted the message. To post a reply, either
reply to this email or visit the message page: [
http://forums.adobe.com/message/4613534#4613534]
To unsubscribe from this thread, please visit the message page at [
http://forums.adobe.com/message/4613534#4613534]. In the Actions box on
the right, click the Stop Email Notifications link.
Start a new discussion in LiveCycle Designer by email or at Adobe Forums
For more information about maintaining your forum email notifications
please go to http://forums.adobe.com/message/2936746#2936746.
North America
Europe, Middle East and Africa
Asia Pacific