Details
Description
If a full page of labels/badges is generated in CiviEvents, and no further contacts/participants remain to be printed, a new page is still added to the end of the PDF stream. Previously this has probably merely been a nuisance, but when a single label/badge is configured as a single page, the extra pages generated on individual prints is an issue.
This patch moves the 'add a new page' logic to the start of the label generation code (from the end of the label generation code).