Jump to content

Selecting images in Image Collections


Recommended Posts

I have an image collection that I need to add 2 page pdfs to several times a week. I will use both pages of each pdf in a variable template as backgrounds.

The name of the background pdf used in the template is coming from a variable text field. My problem is that I can't get the backgrounds to show up unless I add them as images in the template and then republish. I don't want to have to republish every time I add a new pdf. I have tried using both a text field and graphic field.

I tried using

Resource((Field("artver") + ".pdf"))

CreateResource((Field("artver") + ".pdf"), graphic)

I tried using the function FileNameFromPath(fullPath)


the function matchPathToString(path, stringToMatch)

What am I missing??

How do I call out pdfs by name from image collections.

Link to comment
Share on other sites

You will have to create an overflow page that will flow the additional pages.

See the User Guide topic “ It’s got to go somewhere”.

First, you need to create the Rule and do the following: (Don't panic, this can be used in future jobs like this :-)

Add the multipage PDF as a graphic resource.

Start out with a 2 page blank pdf .

Draw TEXT frame on each page as needed.

Select FusionPro>>Manage Pages>>Page Usage

Highlight page 2.

Click Edit

Specify "Type" as "OVerflow"

Give it name "Back_Page"

Click "Ok", "Ok"

Go to the first page of the template.

Click on the text frame to bring up the "Text Frame" palette

Click on "Overflow". Check the option for "Overflow Text To New Pages"

Under "New Left Page", click the drop arrow for "Back_Page"

Leave New Right Page as "None".

Under "Add Pages", select "As Few Added As Possible"

Click "Ok"

Go into the Variable Text Editor, and insert the Rule name

Go to the second page in the template

Click on the text frame to bring up the "Text Frame" palette


In the lower left, check the box for "OverFlow To"

Click “Create Rules>>>New(Text)>>>Empty”.


Check the box for “Treat Return Strings As Tagged Text”.

Here is the Rule:

var pathName = "..\\RESOURCES\\";

var FullResourcePath = pathName + Field("Store Message"); //change to match your data file field

var x = new FusionProResource(FullResourcePath, "graphic", 1);

if (!x.exists)

ReportError("Graphic not found: " + FullResourcePath);

var pdfString = '';

for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++)


x.pagenumber = pgnbr;

pdfString += x.value + '<p>\n';


Print("Result is: " + pdfString);

return pdfString;

Click “OK’, ‘OK’.

Now if you “Preview”, you will only see the first page on the “Overflow” page.


You will need compose a small record range to verify everything works correctly.

Link to comment
Share on other sites

  • Create New...