Odoo Help


wkhtmltopdf page break

Mohammed Khamis
on 11/16/14, 2:53 AM 3,027 views

Hy Every body

I am try to use page break before when I want to convert html to pdf report by webkit but it doesn't work .

So I need To any one can help me to solve this issue

This is my script but the bage break is not work

<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('table.basic_table').each(function(i, tabela){
            var per_page = 5;
            var pages = Math.ceil($('tbody tr').length / per_page);

            if (pages == 1)

            var ultimo = $(tabela);
            for(var p = 1; p <= pages; p++) {
                var copy = ultimo.clone();

                $('tbody tr', ultimo).each(function(i, tr){
                    if (i >= per_page) {

                $('tbody tr', copy).each(function(i, tr){
                    if (i < per_page) {

                if (p < pages)

                copy.css('page-break-before', 'always');

                ultimo = copy;

Thanks Alot

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 11/16/14, 2:53 AM
Seen: 3027 times
Last updated: 3/16/15, 8:10 AM