Support

Home Forums Event Espresso Premium Printing tickets with page break means last page is blank

Printing tickets with page break means last page is blank

Posted: February 9, 2018 at 9:43 am


James Murrin

February 9, 2018 at 9:43 am

Hello

On the custom ticket template (html) I’ve added <style>
@media print{.newpage {page-break-before:always}}
</style> to the top and <div class=”newpage”></div> to the bottom, which works nicely and each individual ticket is on a separate sheet of A4 now.

However, the last page is blank (because there’s a <div class=”newpage”></div> at the end of the file).

Is there any thing we can do to prevent the last page printing? For instance, putting something into the custom template which says if <div class=”newpage”></div> is followed by nothing else, don’t execute it?

Thank you
Dee


Josh

  • Support Staff

February 9, 2018 at 2:58 pm

Hi Dee,

If the .outside <div> is still wrapping the content of the ticket template you can do this instead:

<style>
@media print{.outside:not(:first-of-type) {page-break-before:always}}
</style>


James Murrin

February 9, 2018 at 3:13 pm

That’s great, thank you Josh! That did the tricky very nicely! Dee

The support post ‘Printing tickets with page break means last page is blank’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso