Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • pagedjs pagedjs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 202
    • Issues 202
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pagedjs
  • pagedjspagedjs
  • Issues
  • #362

Closed
Open
Created Mar 21, 2022 by julientaq@julientaqOwner

reset counter(pages)

馃洝 @kominoshja 路 9 months ago Author Owner

Hello, I use the current version of pagedjs 0.2.0.

Resetting the page counter with 1 works like expected. But the pages counter is still buggy.

The goal of my project is to merge two pdfs into one, therefore I need to reset the page and pages counter.

html markup:

should be Page 1 of 2
should be Page 2 of 2
should be Page 1 of 3
should be Page 2 of 3
should be Page 3 of 3

css:

@page { @bottom-left { content: 'Page ' counter(page) ' of ' counter(pages); } }

wished Footer:

Page 1 of 2 Page 2 of 2 Page 1 of 3 Page 2 of 3 Page 3 of 3

with .reset-print-page { counter-reset: page 1; }

Page 1 of 5 Page 2 of 5 Page 1 of 5 Page 2 of 5 Page 3 of 5

with: .reset-print-page { counter-reset: page 1 pages 1; }

Page 1 of 5 Page 2 of 6 Page 1 of 6 Page 2 of 6 Page 3 of 6

I don't think that the pages counter should be automatically changed by resetting the page counter because that could be also a requirement for someone.

In previous comments only page counter was mentioned. Will this fix also apply for pages counter?

By mss@ef on 2021-06-17T13:05:46 (imported from GitLab)

Assignee
Assign to
Time tracking