Jump to content

Variable Image


kopytekinc

Recommended Posts

I have created a rule from the templates and some viewing on this forum, it appears sound but when merging i get the message below I dont even have a frame in the location it is suggesting I have issues with, any ideas? I am on Windows, using FP Desktop 7.1p1c and Acrobat Pro 9

 

Rule

 

var varPicName = Field("USER_ID") + "photo.jpg";

var varPic = new FusionProResource(varPicName, "graphic", true);

if (varPic.exists) {

return varPic;

}

else {

return Resource("defaultphoto1.jpg");

}

 

Error Message

 

Composing record #1, input record 1

Word <14570> does not fit in frame after line 0.

The amount of text inserted into a flow exceeds the depth

of all frames in the flow <User ID Temp>. Text is truncated.

Text does not fit in the last frame on page 1 at (0.05, 2.89).

 

Thanks in advance for any assitance

Link to comment
Share on other sites

All of my graphics are named 12345photo.jpg, the images show up just fine in preview, it just gives me this bizarre code and takes longer because it throwing the error. The merge even looks correct just the error message when composing. The images are in a folder a couple of directories away, but are all in the Resources.
Link to comment
Share on other sites

If your images are already in Resources, why are you attempting to add the images as new resources with your code? Instead of creating new resources, you should be using the ones you already have.

var varPic = Resource(varPicName, "graphic", true);

I still think the error is in reference to text rather than a graphic. Do you have any rules that return a text value (used or unused)? Do you have a frame on your template called "User ID Temp"?

Link to comment
Share on other sites

What I am trying to do with this rule is take a field in the data, caleld USER_ID and add photo.jpg to the end of it to then select the correct image from the data, I am doing it this way so that I can avoid having to actually match them all up in a switch.

 

As for the User ID Temp, not sure where it is coming from, I looked into my overview and saw nothing with that name. I went through this morning and was able to just get rid of that error message but have no idea why.

 

Thanks for all your help esmith, you have been a great help each time I have posted here

Link to comment
Share on other sites

  • 5 months later...
For some reason we cannot get our graphic, a Photoshop .jpeg file to connect to our preview. Under resources it's saying status ok, any help? We're new members to Marcom, and this is the first job using a graphic.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...