Jump to content

Overflow Not Working as Expected


esmith

Recommended Posts

As a result of this thread, I was trying to incorporate this solution into my job to generate the output I need. Instead of getting the final result of a range of pages for each record of my data, I am getting a blank first page followed by the first page of the range for the first record.

 

I am uploading a sample job showing what I currently have in place using a modified rule from Alex's post. The attachedf zip contains sign_template.pdf which is my FP template, 122202_signs.pdf is the PDF resource the rule references, 122202_output.pdf is the result I'm currently getting when composing the first record, and 122202_correct.pdf is what I want to be getting.

 

Would anyone mind showing me the one line I am missing in my rule that clears it all up?

template_overflow.zip

Link to comment
Share on other sites

Finally got it working. Used this code (modified from the code in the link in my 2nd post):

var PDFfileName = "BPA.pdf";
var markupToReturn = "";

//Create a new resource that references this 
var PDFresourceRef = CreateResource(PDFfileName ,'graphic' ,'no');

//It will loop through and create markup for each page in the PDF.
for (pageLoop = Field("START"); pageLoop <= Field("END"); pageLoop++) {
   markupToReturn += '<graphic file="' + PDFresourceRef.name + '" pagenumber = "' + pageLoop + '" position="afterline"/>\n';
   markupToReturn += '<P>';
}

//remove the last <P>
markupToReturn = Left(markupToReturn, markupToReturn.length - 3);

return markupToReturn;

I think I was missing the CreateResource line in my previous try.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...