Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
Javascript: Detect page breaks in printed HTML

I would like to detect page breaks in printed HTML with javascript.

I've found many information on how to insert page breaks with CSS. My goal is, however, not modifying anything, just finding out where each page ends (coordinates in pixel, or a reference to the first or last object on a given page).

I've read the description of the pageBreakAfter property, however, it is a kind of policy, whether there can / should be a page break considering the amount of stuff already written on the page. I would like to know where actual page breaks are.

(The purpose of this detection is that based on its result I will fine-tune margins and font sizes to optimize the layout.)

Any ideas?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!