html – Have borders for every page in css print-ThrowExceptions

Exception or error:

The question seems to be pretty simple but I didn’t find a solution all over the internet. I searched a lot for the solution, I will link the URLs I referred to.

My Output where borders were not closed and not opened for next page

Reference Image

But this is what I need

My requirement

You can see here the borders are closed for every page, this is what I need.

I tried @page property but it supports only margins and not borders

I referred:

  1. How to make page border in print CSS for every single page
  2. Draw a border around each page on print CSS?
  3. Add borders to each printed page with CSS?
  4. How can I give page border to html page while printing?
  5. Draw a border around each page on print CSS?
  6. body border for all pages – CSS print media
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *