Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Image field - cannot set h and w attribute of all node elements

Avatar

Level 2

Hi guys,

We currently need to show some photos on our .pdf forms when the form is generated.  The number of pictures are unknown at runtime and need to be determined dynamically.  This is not the problem - we figgured this out by using base64 encoding for retrieving these picture.

Now, when we try to display all of these picures on the .pds we would like to have control over the width and size of these pictures ( the h and w properties.). The problem is that only the VERY FIRST picture gets applied these properties that we set, and all the following pictures are the size as per design time.

This is obviously do to us not knowing how to "loop through" this node in JavaScript/FormCalc.  Please help!  Also, which event should we use?

This is the code we are using:

xfa.form.pdfFields.Notification.SubformPhoto.Table9.Row1.ImageField2.h

=

"4in";

xfa.form.pdfFields.Notification.SubformPhoto.Table9.Row1.ImageField2.w

=

"4in";

We thought that the following should work to apply the values for all the elements, but this does not work.

xfa.form.pdfFields.Notification.SubformPhoto.Table9.Row1.ImageField2[

*].h = "4in";

xfa.form.pdfFields.Notification.SubformPhoto.Table9.Row1.ImageField2[

*].w = "4in";

Thanks!

0 Replies