Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wkhtmltopdf Vertical text on right hand side of every page

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

like image 521
Jason Weh Avatar asked Feb 11 '23 22:02

Jason Weh


1 Answers

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;
}
like image 163
chamalabey Avatar answered Feb 18 '23 22:02

chamalabey