Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page numbering folow content of page trouble use JavaScript #708

Open
VoTaiTri opened this issue Dec 19, 2017 · 0 comments
Open

Page numbering folow content of page trouble use JavaScript #708

VoTaiTri opened this issue Dec 19, 2017 · 0 comments

Comments

@VoTaiTri
Copy link

VoTaiTri commented Dec 19, 2017

I'm try to print list tables,
with next table, i'll break page
with table have many rows, i'll break page
and i want to count page number folow content of table
i'll count page by the end of table, not by the end of page
each table, i'll reset page number
ex:


page1
content of table 1

1 (page number)



page2
content of table 1
end of table 1

2 (page number)



page3
content of table 2
end of table 2

1 (page number)



page4
content of table 2
end of table 2

2 (page number)


i folow https://github.com/mileszs/wicked_pdf#page-numbering and try to do

<html>
  <head>
    <script>
      function number_pages() {
        var vars={};
        var x=document.location.search.substring(1).split('&');
        for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = decodeURIComponent(z[1]);}
        var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
        for(var i in x) {
          var y = document.getElementsByClassName(x[i]);
          for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
        }
      }
    </script>
  </head>
  <body onload="number_pages()">
    Page <span class="page"></span> of <span class="topage"></span>
  </body>
</html>

but it's my expect
can you help me do it?
many thanks

@VoTaiTri VoTaiTri changed the title Page numbering folow content of page trouble Page numbering folow content of page trouble use JavaScript Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant