Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 24th, 2019, 05:02 AM
mdlivels mdlivels is offline
Junior Community Member
 
Join Date: May 2011
Location: Gettysburg, PA
Posts: 17
Default Multi-Line Records, inserting PDFs

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?

Code:
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;
Reply With Quote
Reply

Tags
insert pdf, loop, multi-line records

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.