It is currently Sun Jul 21, 2024 2:36 pm


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to force a page-break on weasyprint?
PostPosted: Wed May 18, 2022 4:30 am 
Newbie
Newbie

Joined: Thu Apr 14, 2022 12:53 pm
Posts: 8
Hi

I wonder if its possible to create a force break that splits the table rows? I think weasyprint does this in a sense but I want to break the rows in to specific counts (e.g 6 rows per page). Is that possible? I tried something like this:

<table>
<tr>
<th>Header1</th>
<th>Header2</th>
</tr>
{% for d in data %}
{% if forloop.counter == 6 %}
<p style="page-break-before: always;"></p>
{% endif %}
<tr>
<td>{{ d.name }}</td>
<td>{{ d.age }}</td>
</tr>
{% endfor %}
</table>
but it just break each row in different pages. Any help echatspin echat would be appreciated.


Last edited by Billy3 on Thu Jun 09, 2022 11:37 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How to force a page-break on weasyprint?
PostPosted: Thu May 19, 2022 4:45 pm 
Getting Started
Getting Started

Joined: Wed May 26, 2021 3:14 pm
Posts: 52
Hello,

Please note that this is a forum for our hosting and in general we do not offer web developing services or have the knowledge to answer most of the questions on this matter. You might find more information in web developers' forums instead. Thank you for your understanding.

Best Regards,
Damon Felix
ModeratorsTeam
Freehostia.com

_________________
Damon Felix
ModeratorsTeam
Freehostia.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ]  Moderators: Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011