- This topic has 4 replies, 2 voices, and was last updated 5 years, 2 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Page breaks in pdf file
Hi,
I am trying to add page breaks to my pdf template, using css: page-break-after:always;
But this tag gets stripped from the template when I save.
Is there any way to add page breaks? I’ve tried wrapping the code in a table at 100% height but that creates blank pages before each page.
Any suggestions welcome.
Cheers,
Leo
Try adding your tag in the EME options, tab “Other”, under “Extra html tags”. That should prevent wordpress from stripping it out.
I’m afraid that doesn’t work as hoped. 🙁
I added the line “table, background-repeat, background-size” to the Extra html tags, but they still get stripped when saving the template.
background-repeat and background-size are style-properties, not something directly as a table-property.
So, something like this works:
<table style="width: 100%; border-collapse: collapse; background-color: #c23232;">
The thing is, wordpress strips background-repeat and background-size inside the style property. Simple solution: use the class property and add your own class to eme (see https://www.e-dynamics.be/wordpress/category/documentation/9-changing-the-layout-css/ )
Thanks, that’s a great suggestion. I didn’t realise that eme.css also covers the templates.
Still, when I add these properties to the css class, only ‘background-repeat’ works, ‘background-size’ does not.
The weird thing is that the EME template itself does accept ‘background-image’, which I think is also a style-property. But scaling in any way or form (even as ) seems impossible.
It all seems quite random, but I gather that’s WordPress?
Anyway, I’ll figure out some way to make it happen. Many thanks again.