These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

image field

grandxprix
Registered: Nov 14 2007
Posts: 63

I created a form in live cycle designer. I have added image fields so end users can attach photos onto the form. I have several photos that need to be addeed to the form. The file gets so large, it ends up freezing because of all the photos. Is there any way possible to add a limit to the picture size or have them somehow reduce in file size when attached onto the form. I am guessing the only way is to specify a limit, but i wanted to double check.
 
Also, is there way to add more file types for the image field to accept, like .doc or .pdf

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately the answer to all your questions is NO. Acrobat JavaScript, especially the liveCycle JS, doesn't have access to any of the image properties. JavaScript is pretty much set in stone. You get what Adobe provides and no more.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

gbses
Registered: Jan 16 2011
Posts: 2
Thom,

in referance to imageField, is it possible thesedays, to add a limit to the picture size?

Thank-you.

I'm using LC Designer ES2
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

you can validate the image size, to prompt the users if the imported image was too large.

This JavaScript has to be placed into the validate:Event of the image field.
It will allow images up to 1MB (1048576 Byte).
  1. if(ImageField1.resolveNode("value.#image").value.length > 1048576)
  2. {
  3. if(xfa.host.messageBox("Selected Image is to large","",0,0)==1)
  4. {
  5. ImageField1.rawValue = null;
  6. }
  7. }

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

gbses
Registered: Jan 16 2011
Posts: 2
thx radzmar.. its help a lot!