Jump to content

Connecting graphic frames


Recommended Posts

I'm trying to create a rule that allows a customer to upload a 2 page PDF and have the second page of the uploaded PDF flow to the second page of my template. I've been in constant contact with support on this and seem to hit a wall.

 

My Rule:

 

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

var FullResourcePath = pathName + "<graphic file=" + Field("Cover") + ".pdf">;

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;

 

Please note on this rule I do get a syntax error

 

Any help on this is greatly appreciated.

Link to comment
Share on other sites

I'm trying to create a rule that allows a customer to upload a 2 page PDF and have the second page of the uploaded PDF flow to the second page of my template. I've been in constant contact with support on this and seem to hit a wall.

You don't connect Graphic Frames. This rule creates a series of inline graphics, which go into Text Frames. You need to make this a Text rule, and insert the rule's name as a variable into a Text Frame. Then, you would typically set up Overflow pages to flow into.

Please note on this rule I do get a syntax error

You need to put the last tag closing marker > inside the quotes at the end of line 2, just before the ending semicolon:

var FullResourcePath = pathName + "<graphic file=" + Field("Cover") + ".pdf>";

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