It has been a bit since I worked in cfscript and I am sure you have
thought of this but can you check for null using 'isDefined("form")' ?

Just a thought.

Doug

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris
Miller
Sent: Monday, June 06, 2005 8:29 PM
To: [email protected]
Subject: [iText-questions] Copy PDF Forms with Cold Fusion

I'm attempting to copy one PDF artwork file and one PDF document with
form fields to a single page PDF document. I'm using Cold Fusion to
connect to the iText library and using cfscript to code the document
which requires a bit of modification when converting code from java to
javascript. Here is the bit of code that I'm having problems with,
please advise. Specifically, it's telling me that the copyAcroForm
method cannot be found. I've replaced "writer." with PdfCopy to call the
copyAcro method directly, but its not working...
I'm not entirely sure how to do the null check for an AcroForm because
cold fusion cannot handle those types of objects, any ideas would be
great, I've put about 12 hours into these lines of code and this is a
last resort, thanks!

Here's the original working code in java...
PRAcroForm form = reader.getAcroForm();
if (form != null)
writer.copyAcroForm(reader);
                    
Here's a couple variations i've tried that don't work in cfscript...
form = PRAcroForm.getAcroForm(newreader);
        PdfCopy.copyAcroForm(newreader);

another variation:
form = readerForm.getAcroForm();
        writer.copyAcroForm(readerForm);



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you
shotput a projector? How fast can you ride your desk chair down the
office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions


****************************************************************************************
BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is intended 
only for the individual or entity to which it is addressed and may contain 
information that is confidential and protected by law. Unauthorized review, 
use, disclosure, or dissemination of this communication or its contents in any 
way is prohibited and may be unlawful. If you are not the intended recipient or 
a person responsible for delivering this message to an intended recipient, 
please notify the original sender immediately by e-mail or telephone, return 
the original message to the original sender or to [EMAIL PROTECTED], and 
destroy all copies or derivations of the original message. Thank you.  
(BFeComNote Rev. 07/29/2003)
***************************************************************************************


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to