I am generating variable length documents using the Sweave package in R
and LaTeX. The reports contain variable information per recipient and
are variable in page length conditional on a variety of factors such as
number of students enrolled in a school and number of grade levels in
that school etc.
One of the challenges I face is to communicate the binding (stitching)
instructions to the printer to identify where a school-specific report
ends and where a new report begins. The goal is for the printer to
identify the breaks and bind the individual school reports. This cannot
be easily automated as each report varies in its number of pages.
Currently, I create two forms of output using pdflatex, although it does
not need to be a pdf. One form of output is a main file with all reports
in one tex document. Each report is separated by page breaks. This is
efficient as I only compile one time and create a pdf with all schools
in one file.
The other form of output is one tex document for each school. This is
inefficient, at least I think so, as I then need to write a batch file
to compile each of the N number of tex files to create individual pdfs.
Our preference is to work with the first form and create a single pdf
file. Now the school reports are separated by a page break inside the
pdf. So, visually scrolling through the pdf one can see where a new
school report begins. However, it is not based on a pattern because of
the variable length of the reports. Some are 4 pages while others might
So, it seems the challenge is to communicate to the printer where a new
report begins and ends and to bind this report. Is anyone familiar with
any resources that I might review or suggestions for dealing with this
I am not sure if any users are also familiar with VIPP, a program that
is similar in nature to what I am doing here. But, using VIPP one can
communicate such instructions to the printer via code. So, I'm thinking
tex would have a parallel option.