mdlivels Posted April 24, 2019 Posted April 24, 2019 Hi- Trying to use a mutli-line record data file and insert variable page count PDFs into my Fusion template, but I cannot get it right. I have no issue calling in one PDF (the filename is literally in the data) but I cannot get it to advance and continue adding PDF files until the next record. Can't show the data, but it's pretty simple with a mutli-line record that advances when a certain field changes. The corresponding records all contain different PDF filenames, but again I'm only able to pull in the first one and then it moves to the next record. Is this even possible? var pathName = "\\gcomsecure\Resources\MDL\\"; var data = FusionPro.GetMultiLineRecords(); for (var rec = 1; rec <= data.recordCount; rec++) var FullResourcePath = pathName + Field("Filename"); //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) { ReportError("Graphic not found: " + Field("Filename")); } var pdfString = ''; for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++) { x.pagenumber = pgnbr; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString; Quote
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.