Jump to content

Create pages based on a number in data


Recommended Posts

Need some help on a job that we running labels for. These labels will be 2 x 3.5 in size and fit 10 up on a 8.5 x 11. The customer has provided me the data file.




The Item is going to be a callout to an image called 5038.pdf, 5039.pdf, etc. What I need help with is how to create pages based on the second column. For example, the item 5038 will need 8 pages of item 5038.pdf. The second entry of 5039 will need to be 8 pages of item 5039.pdf. Etc...


I was thinking the thread with the insert sample would work to insert inline pdf pages but since my pdf's are all just one page and I need to mulitple the pages by the number in the data, did not seem to work. Any help?

Link to comment
Share on other sites

  1. Add a page to your job for each page type (5038.pdf, 5039.pdf, etc.)
  2. Go into the Page Usage dialog (from the menu in Acrobat, FusionPro -> Manage Pages -> Page Usage), and for each page, click Edit, then set the name to match the data field value that invokes it and check the "Unused" box.
  3. In your OnRecordStart rule, call FusionPro.Composition.SetBodyPageUsage to select the page you want, and set FusionPro.Composition.repeatRecordCount for the repeat number, like so:

FusionPro.Composition.SetBodyPageUsage(Field("Item"), true);
FusionPro.Composition.repeatRecordCount = Field("SG 1");

Link to comment
Share on other sites

Works like a charm. One question though. When my data has a "0" it is defaulting value to 1 which then returns 1 page. Is there a way to skip the record if 0?

Sure, add this to your OnRecordStart rule:

FusionPro.Composition.composeThisRecord = Int(Field("SG 1")) > 0;

Link to comment
Share on other sites

  • 1 month later...

I have another job that requires me to pull multiple books by their name in a data file. Here is a sample of the data that will be sent to me.



If you look at the first row I will need to output one pdf that will have the file test.pdf, test2.pdf and test3.pdf in sequence. I will then need a second pdf that will have test.pdf and test2.pdf combined in one pdf and so on.


Is there a rule I can use to call out to these multple pdf's?

To output one file per record I would just input the number 1 in the output composition setting to output multiple files, correct?

Link to comment
Share on other sites


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

  • Create New...