Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 2nd, 2012, 03:03 PM
carsong carsong is offline
Forum n00b
 
Join Date: Jun 2011
Posts: 1
Default Creating a variable page pdf from graphics

I have one image for each letter of the alphabet.

My input data file looks like:

Text
Paris
Belgium

I would like to create a 5 page pdf from the letters of the alphabet for record 1 and a 7 page pdf from the letters of the alphabet for record 2.

How is this accomplished?

I've tried a pdf with overflow page and text frame with rule returning tagged output here is the validated rule output:

Code:
<graphic file="80.gif" pagenumber = "1"/><P>
<graphic file="65.gif" pagenumber = "2"/><P>
<graphic file="82.gif" pagenumber = "3"/><P>
<graphic file="73.gif" pagenumber = "4"/><P>
<graphic file="83.gif" pagenumber = "5"/>
Here's my rule:

Code:
var string = Field("Text");
var markupToReturn = "";

string = string.toUpperCase();

for (var i = 0; i < string.length; i++)
{
    var resourceRef = CreateResource(string.charCodeAt(i)+".gif",'graphic' ,'no'); 
    markupToReturn += '<graphic file="'+resourceRef.name+'" pagenumber = "' + (i+1) + '"/>';
    markupToReturn += '<P>';    
}

markupToReturn = Left(markupToReturn, markupToReturn.length - 3);

return markupToReturn;
Reply With Quote
Reply

Tags
frame, graphics, mult-page, pdf, variable

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 03:26 PM.


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