Jump to content

Rule Creation


Recommended Posts

I use 6 different postcard with different backs and fronts. Each postcard is named as follow:

1st Postcard: T1 front.pdf, T1 Back.pdf

2nd Postcard: T2 Front.pdf, T2 Back.pdf

3rd Postcard: T3 Front.pdf, T3 Back.pdf

4th Postcard: T4 Front.pdf, T4 Back.pdf

5th Postcard: T5 Front.pdf, T5 Back.pdf

6th Postcard: T6 Front.pdf, T6 Back.pdf


My data file includes mailing type T1,T2,T3,T4,T5, and T6. I need help with writing rule where if the data file come across T1 file, the T1 front and back would print with customer information. Thanks :confused:

Link to comment
Share on other sites

There are a couple of ways you could go about doing this. One is to add all 6 of your postcards as resources and then create a template with two blank pages, each with a graphic frame covering the entire page, and use an OnRecordStart rule to place the appropriate images for each record.


Another option is to create a 12-page PDF template (merging all 6 PDFs into one) and name your pages using the "Manage Pages..." dialog (T1-front, T1-back, T2-front, etc.) while also setting all pages to be unused. Then, in an OnRecordStart rule you would override the unused setting for the two pages that were actually used per record based on the data.


For the latter option, assuming you are using FP 6.x, your OnRecordStart rule would look something like:

var cardFront = Field("Mailing Type") + "-front";
var cardBack = Field(Mailing Type") + "-back";
FusionPro.Composition.SetBodyPageUsage(cardFront, true);

Link to comment
Share on other sites

Thanks for your reply, I am one week old owner of this incredible software and I need lot of help. I have imported all PDFs in my resource and also linked T1 file to T1 PDF. Is it possible to have Front and Back of a template as one file like T1 so when T1 file appears in data file the software would print front and back of T1 Template and so on and so forth ? Thanks
Link to comment
Share on other sites

I think you should ignore my first paragraph in my last post and instead follow the information in the latter part. The result will be a 12-page template file (with no resources) which are all unused. Using the code supplied above, the necessary front and back pages for each record will "activate" during preview or composition.
Link to comment
Share on other sites


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

  • Create New...