Christian Johnson Posted October 25, 2019 Share Posted October 25, 2019 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. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted October 25, 2019 Share Posted October 25, 2019 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>"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.