1

How to add page border for all generated pdf pages from HTML to pdf using wkhtmltopdf library?

I tried with

div.page
{
    page-break-after: always;
    page-break-inside: avoid;
    border: 5px double !important;
}

but no luck.

Simmilar question : add border to pages printed using wkhtmltopdf

EDIT : enter image description here

visabhishek
  • 113
  • 2
  • 11

1 Answers1

-1

Simply create an HTML page with below CSS and try to generate pdf file using wkhtmltopdf

<html>
<head>
<style>
 body {
  width: 100%;
  height: 2000px;
  margin: 0;
  padding: 0;
}

.border {
  position: fixed;
  top: 0;
  left: 0;
  border: 5px double;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  page-break-after: always;
  page-break-inside: avoid;
  box-sizing: border-box;
}
</style>
</head>
<body>
<div class="border"></div>
</body>
</html>
T Sooraj
  • 556
  • 1
  • 5
  • 18