Jump to content

Graphics won't show up


Cmostaert

Recommended Posts

Hi there,

 

We are very new to fusionpro. We are creating a template that will have 1 variable text box and one variable graphic box. We deifinitley have the text box under control. Our problem is the graphics box. All we need is to have an agent picture in there. We have that box looking a the folder with the images in there but nothing is showing up in the box. We were told by one person that our .jpg wasn't saved corectly. We don't know what that means. Our photo person said there's only one way to save a .jpg. I'm looking for something we've missed.

 

Thanks

Cmostaert

Link to comment
Share on other sites

Does your data specify the file name of the jpg you wish to pull in? Or are your jpgs named in accordance to a field in your data such as "Agent Name"?

 

If so, you want to create a graphic rule that tells FP what image to pull in for each record:

return CreateResource("/PATH TO IMAGES/" + Field("Agent Name") + ".jpg");

 

Then draw a graphic frame and apply the rule you just created to it by selecting the "[Field or Rule]" drop down on the "properties" palette.

Link to comment
Share on other sites

Our data has a field for Agent photo and in that field are the names of the photos that is for each person in the data. In training we just told it what field to look in and the photo showed up in the box. Is there more to it than that? It seemed so easy in training...

 

Cmostaert

Link to comment
Share on other sites

In training we just told it what field to look in and the photo showed up in the box. Is there more to it than that? It seemed so easy in training...

To do what you are trying to do, you have to predefine your field data types. By default they are all imported via the wizard as text. You need to go to "Data Definition > Edit Flat File Data" under the FusionPro menu and change the "Agent Photo" field to Graphic (this can also be done during data import via the Wizard).

Link to comment
Share on other sites

We do have that as a graphic. That was my first thought when we started this form, but we have it right.

Let me ask you this. Within the template, can we change the sample data it is looking at?

 

Thank you so much. This is helping me understand some things.

 

Cmostaert

Link to comment
Share on other sites

  • 3 months later...

Hi there,

We are still having this issue with the photos of the agent not showing up on the template. We thought we had a rule that would work but it won't. Here is the rule we were given to use - see if anyone can tell me what we doing wrong.

 

agentPhoto = CreateResource(Field("AgentPhoto"), "graphic" , true);

If (agentPhoto.exists)

return agentPhoto;

else return Resource("photo_not_found.pdf");

 

I'm not sure what the phot not found .pdf is.

 

When we used this rule we keep getting an error message something about the resource in the last line.

 

Please help.

Chris

Link to comment
Share on other sites

Hi there,

We are still having this issue with the photos of the agent not showing up on the template. We thought we had a rule that would work but it won't. Here is the rule we were given to use - see if anyone can tell me what we doing wrong.

 

agentPhoto = CreateResource(Field("AgentPhoto"), "graphic" , true);

If (agentPhoto.exists)

return agentPhoto;

else return Resource("photo_not_found.pdf");

 

I'm not sure what the phot not found .pdf is.

 

When we used this rule we keep getting an error message something about the resource in the last line.

 

Please help.

Chris

I think that whoever gave you that rule assumed that you would have a generic placeholder graphic to show when the agent photo isn't found, but they didn't know exactly what the name of the generic graphic would be. So they wrote it to call out a named resource instead of a particular file name.

 

There are basically three things you can do:

 

1. Add a Graphic resource to the job with that name. From the menu in Acrobat, select, FusionPro -> Data Definition -> Input Options, click "Edit Resources", then "Add", browse to the file you want, and set the Resource name (NOT the file name) to "photo_not_found.pdf".

 

OR

 

2. Change that last line to call CreateResource instead of Resource, like so:

else return CreateResource("photo_not_found.pdf");

Then can either rename your generic file to "photo_not_found.pdf", or change that last line of the rule to whatever the name of the file is.

 

OR

 

3. If you don't want any graphic to show up at all when there's no agent photo, change the last line of the rule to this:

else return NullResource();

Pick any one of those.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...