5

Below is example of PDF produced using wkhtmltopdf. I need to produce text down the right spine of the every page. I have tried adding it to the header code put seems to clip the body of the PDF. I am using header and footer parameters of wkhtmltopdf. Not too sure how or if i can get this text on right hand side of every page.

Example of want pdf to look like

Jason Weh
  • 314
  • 4
  • 12

1 Answers1

9

You can use CSS and set the position of the element to fixed. Try this:

.vertical-text {
    position: fixed;
    -webkit-transform: rotate(90deg);
    -webkit-transform-origin: center bottom auto;
    top: 50%;
    right: 0;
}
chamalabey
  • 457
  • 5
  • 12
  • This works on first page when specify length in cm for top attribute. Wonder if i can get it to repeat itself every so many cm – Jason Weh Feb 12 '15 at 22:57
  • Thinking need to write jscript code calculates the height of the body and adds so many divs with class vertical text. Each tag overides the top attribute. – Jason Weh Feb 12 '15 at 23:36