Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: merging using xfdf
Conf: (P-PDF) Developers, Msg: 128593
From: ricl999
Date: 3/1/2005 03:24 AM

hi everybody.

Im new to pdf javascript

What i am trying to do is this. Create a mailmerge to functionality using xfdf to run with out any user interaction. i seem to have this done mostly. i create a PDF and put the required form fields on it. each field default contais something like #fieldname)# also save the pdf.
an external process takes the pdf as atemplate saves it to a temp directory (as another name) and then takes the xfdf and replaces all the #(fieldname)# entries with the appropriate data. then it launches acrobat reader passing the xfdf filename. ok so far. reader starts up loads the pdf and prints it having merged the data from the xfdf. Good. We do not want to use digital signatures. so i am trying to load an image of the signature as the icon on a button 'appSig'. using another field as the controlling field 'appSigControl' and a third field containg the image filename 'appSigFileName'

the script is as follows is attached to the 'appSigControl' field.

var sigControl = this.getField("appSigControl");
var sigControlValue = sigControl.value;
if (sigControlValue == "sign"){
var sigFileName = this.getField("appSigFileName");
var sigFileNameValue = sigFileName.value;
var sigField = this.getField("appSig");
sigField.buttonPosition = position.iconOnly;
sigField.buttonImportIcon(sigFileNameValue)};

this script works if i do it manually. ie i have the form open go to the field 'appSigFileName' set it to the required value then got to the field 'sigControl' set the value to 'sign'. However when the form is loaded as described above the merge works for all field except the java script does not seem to be applied. the 2 fields 'appSigFileName' and 'sigControl' are filled but not 'appSig'

i have tried putting the script into 'doc open' event and 'will print' event. none seem to work. I am using acrobat 5.0 to set this all up and reader 5.0 to process it.

Any help would be appreciated


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.