The newspaper is printed on sheets of paper that contain two spreads of two pages each, one on the front and one on the back, for a total of four pages per sheet.
Each sheet can be printed in color or black and white. At our typical publication size of 28 or 32 pages each week, we tend to print the two outermost sheets and the two innermost sheets in color, the rest in black and white. This can change based on page count and what’s in the paper.
For a given issue size, when we send them our pages to be printed we need to tell the printer which sheets to print in color, communicated as a list of page numbers. So, for a 32 page paper, we ask them to print pages 1, 2, 3, 4, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30, 31 and 32 in color.
The indication of which pages should be color has to be reflected in a few other places, e.g. in our issue planning database where we organize what story or ad is going to be on a given page, or encoded in the way we name the PDF files we send the printer, appending a _COLOR
indicator in the right place when needed.
So all that’s to say that getting the list of color pages for a given page count is a weekly bit of math we have to do in several places, and the answer is important.
I suspect there are some publishers or newspaper people out there who have internalized that math and can quickly give the answer without thinking. I cannot, at least not yet.
I recently wrote a PHP + Laravel function that calculates this for me, and it’s a part of a larger toolset we are using to plan, manage and produce our print issues.
Here’s the code, simplified a bit by removing some validation checks:
public function getColorPageNumbersForPageCount(int $pageCount): array
{
$pagesPerSheet = 4;
// First two outer sheets of every issue are color
$outerSheetsColor = 2;
// For every 12 pages of issue length, add 2 inner sheets of color
$innerSheetsColor = floor($pageCount / 12);
$sheets = [];
// Divide the total pages by 2 and then pair the pages to a sheet, 4 at a time
for ($i = 1; $i <= ($pageCount / 2); $i += 2) {
$sheets[] = [
'type' => 'bw',
'pages' => [
$i,
$i+1,
($pageCount + 1) - $i - 1,
($pageCount + 1) - $i,
],
];
}
$sheetCount = count($sheets);
$colorKeys = [];
// Build out which inner and outer sheets have color
for ($i = 0; $i < $outerSheetsColor; $i++) {
$colorKeys[] = $i;
}
for ($i = 0; $i < $innerSheetsColor; $i++) {
$colorKeys[] = $sheetCount - 1 - $i;
}
foreach ($colorKeys as $sheetKey) {
$sheets[$sheetKey]['type'] = 'color';
}
$sheets = collect($sheets);
// Return an array of color pages in order
return $sheets->where('type', '=', 'color')
->pluck('pages')
->flatten()
->sort()
->flatten()
->toArray();
}
There are probably ways to simplify it further. But for now I can run:
getColorPageNumbersForPageCount(28);
and get back an array:
[ 1, 2, 3, 4, 13, 14, 15, 16, 17, 18, 19, 20, 29, 30, 31, 32 ]
which is then used in a variety of places. And thusly, a few brain cells are freed up for working on other things.
Leave a Reply