Jump to content

Change graphic resource based on variable text frame


mstanton

Recommended Posts

I have a Christmas card that allows the user to type in up to 5 names and they will appear on top of Christmas Stockings. I have set up rules for the text frames that change the location of the name based on how many names are entered. (see attached VariableFrames.jpg for a screen shot of the frames)

 

For example: If there are only two names entered, I don't want them appearing in the two left-most frames, that would look weird. I wanted them to appear in the two center text frames. Then I want a sock to appear behind the name based on the variable text frame, not a particular field, since the information in that field is not always in the same frame.

 

In each variable text frame I placed a rule (the rule below is called RuleName1st):

var1 = Field("1stName")
var2 = Field("2ndName")
var3 = Field("3rdName")
var4 = Field("4thName")
var5 = Field("5thName")

if (var1 != "" && var2 != "" && var3 != "" && var4 != "" && var5 != "") {
   return Field("1stName");
   }
else return ""

changing the operators and Field as I needed to. This code works fine.

 

Then I made rules for each graphic frame:

if (Rule("RuleName1st") != "") {
   return Resource("1stNameSock.eps");
   }
else return Resource("blank.eps")

This code works great while I am just previewing it Acrobat, but as soon as I "Collect for Output" and upload the zip file to my server it stops working. I tried narrowing it down and deleted all graphic resources, rules and frames. This made everything else work as it should so I'm assuming my graphic rule is wrong. Can anyone help?

VariableFrames.jpg.044464d459cb6b8e102f76194f662808.jpg

Link to comment
Share on other sites

I've never used the "Collect for output" option, but I'm guessing that your resource references refer to a hard-coded directory path (/Volumes/User/...) on your computer instead of a soft path in relation to the directory your template resides (./graphics/). This would cause the server to skip over the files it couldn't find. Hopefully someone with more experience uploading files to a server for processing can provide the workaround if necessary.
Link to comment
Share on other sites

If you're right and it has to do with the path of the file, I'm in for a world of trouble unless someone in these forums knows how FusionPro Desktop and EFI Digital Storefront 4.0 work together. But even if I am able to find out what the file path would be (haha, I have my doubts), how can I change the path in my PDF? Every time I try to change the path of my resource, no matter what I put in, an error comes up saying "File does not exist" and it does not allow me to save that path, even if I just delete the first parts of the path (removing the "/Users/Megan/Desktop/....." at the beginning and leaving the "images/1stNameSock.eps" part)
Link to comment
Share on other sites

Just an update: the problem did not end up being with the path name. When a PDF is collected for output a zip file is created including all graphic resources. The issue was with my file type. Apparently, either DSF or FP doesn't like .eps files. When I changed them to .jpg everything worked fine. I don't know if this was an FP problem or a DSF problem because when I looked in the zip files and the FusionPro_collect.msg files I noticed that sometimes the .eps files had been collected and sometimes they had not.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...