Jump to content

Question with Job Log

Recommended Posts



I have a ticket job that I have done for the last two years and getting the job done hasn't been a problem. I am about to hand it over to someone else and thought it was time to try and tidy up a message I get in the log file.


The tickets are for an event that runs over say 5 days. With a day session and night session. Each session has a different background image colour, these are pdf resources (I have named these backgrounds small).


On a couple of the days there is a different access for some session tickets which means the background image needs to be the same colour only slightly different layout (These again are pdf resources which I have named large)


For my graphic frame I have a rule that checks a field (see attachment). If there is data in the field then it applies another rule (large) that checks for the day and session to apply the different size background. If no data is present it applies another rule (small) for standard background.


When I compose my job works perfectly but when I check the log file every time the small background runs the log records "Graphic rule LargeBackgroundRule did not return a resource of type graphic".


When the rule finds this condition the log file records no issue. My understanding was that if a rule wasn't met then it moved on till it found a condition. If I reverse the rule options so I am looking for the field to be blank I still get the same log message.


Hopefully I have made some sense but am happy to post other info if it may help.


I am on MacOS 10.13.5 using Acrobat DC 2015 with FusionPro 10.0.26


Link to comment
Share on other sites

I can't see all of the rule, most notably the value you're comparing to after the "begins with" drop-down. Can you convert the rule to JavaScript and post the syntax as text? Posting the other rules it's calling (LargeBackgroundRule and SmallBackgroundRule) would help too.


Even with the full rules, though, I'm not sure that's enough to analyze the problem. Having the collected job, including the data file, would make it easier to figure out what's going on. A composition log (.msg) file would be helpful as well.

Link to comment
Share on other sites

Thanks for posting the job. But are you sure this is the same job that generates the message you quoted in your original post?

When I compose my job works perfectly but when I check the log file every time the small background runs the log records "Graphic rule LargeBackgroundRule did not return a resource of type graphic".

I don't see any rule named "LargeBackgroundRule" in the job you posted. I was also able to compose the job with no errors or warnings.


So I'll have to ask you for more information. Please:

  1. Make sure that the job which generates the message at composition time is the same as the one you posted.
  2. Post the log (.msg) file with the message that you quoted in your original post.
  3. Specify exactly how you ran the job which generated that message. Did you compose directly in Acrobat? Or did you submit the job to FusionPro VDP Producer? Or did you submit the job to FusionPro Server, or some other application using Server?

Link to comment
Share on other sites

Okay, thanks. I can see what's going on now.


That error message is legitimate, because the rule "LargeBackgroundRule" is indeed failing to return a graphic resource.


The thing is, every rule gets run for every record, whether it's actually used in the output or not, so any errors from running a rule will always be reported.


The reason the rule isn't returning a graphic is obvious when you convert it to JavaScript and click Validate:

if ((Left(Field("Date"),Len("Mon")) == "Mon") && (Left(Field("Session Type"),Len("Night")) == "Night"))
  return Resource("C6 M0 Y97 K0-Long.pdf");
if ((Left(Field("Date"),Len("Tue")) == "Tue") && (Left(Field("Session Type"),Len("Night")) == "Night"))
  return Resource("C16 M0 Y0 K0-Long.pdf");
if ((Left(Field("Date"),Len("Wed")) == "Wed") && (Left(Field("Session Type"),Len("Night")) == "Night"))
  return Resource("C61 M77 Y0 K0-Long.pdf");
if ((Left(Field("Date"),Len("Thur")) == "Thur") && (Left(Field("Session Type"),Len("Night")) == "Night"))
  return Resource("C0 M74 Y100 K0-Long.pdf");

return "";

Clicking validate pops up a box with this message:

This graphic rule must return a Resource of type graphic.

Since none of the "if" conditions are met, the rule returns an empty string, which, of course, is not a resource of type Graphic.


The way to fix this is to change the very last line to return NullResource() instead:

return NullResource();

This makes the error message go away. NullResource() is a special function for just this very purpose: You want a rule to return an "empty" resource, without generating an error message.


The way to fix this without converting the rule to JavaScript is to simply add an "else" clause at the end of the Drag and Drop rule, like so:




It doesn't matter what resource you put there for the final "else", since it's not being output if your other rule logic is working as you expect. Though you could always just add a blank graphic to the job for this purpose. Or create another graphic rule that does nothing but this:

return NullResource();

And return that rule in the final "else" clause in the Drag and Drop rule.


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.

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...