Jump to content

Multiple Text Frame Rule Needed


Recommended Posts

Our customer creates their documents in InDesign and are currently using it for VDP, but they'd like to use FusionPro. They have supplied me with an InDesign file where a large text box contains a page full of text, and the Indesign variables. They create multiple layers of this text box, which InDesign prints OK. The FusionPro plug-in for InDesign exports the document OK and each layer is created as a Text Frame OK, but each frame is in the same place on the page. So when output is created, all the Text Frames are presented on top of each other. Attached is the PDF output straight out of InDesign.

 

I need a Rule to present only one of the Text Frames at a time, called by a variable in the data. I have attached a data file we are using for the proof of concept. The field I am using is called Layer.

10-28-2016 Letter_output_from_Indesign.pdf

input-data50records.txt

Link to comment
Share on other sites

The easiest thing to do is to name all of the text frames, one with each of the possible Layer values, and do this in OnRecordStart:

var Layers = ["Alumni Reunion Non Donor", "FAR Student", "FAR Parent", "CPND", "CFPND"];
for (var i in Layers)
   FindTextFrame(Layers[i]).suppress = true;

FindTextFrame(Field("Layer")).suppress = false;

Although there are several "cleaner" ways to do this. One is to take the content of each of those frames and put it into a Formatted Text Resource with the corresponding layer name. Then you only need a single text frame that calls out a rule that does this:

return Resource(Field("Layer"));

Or, you could put each letter on its own page in the PDF, name the pages with the layer names, set each page to be Unused, and do this in OnRecordStart:

FusionPro.Composition.SetBodyPageUsage(Field("Layer"), true);

Or, you could factor out the common parts of the letters and make rules to return the variable parts.

Edited by Dan Korn
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...