Python Module Pisa: How Change Background Color For All Page?
How i can change background color of all page? like this : body,div { background-color:#f4f4f4; } Now background changes only for div with information, remaining page have white
Solution 1:
Acording to the documentacion https://github.com/chrisglass/xhtml2pdf/blob/master/doc/usage.rst#supported-page-properties-and-values @page only accept few css propierties:
background-image size margin, margin-bottom, margin-left, margin-right, margin-top
So maybe the easyest is to make a jpg to draw the background with background color and border. And use that image in background-image propierty:
@page {background-image: url('local_path/to/your/image.jpg')}
Solution 2:
I hope this will help you
html,body{height:100%}
body,div { background-color:#f4f4f4; }
and your Second Question > How i can draw border around ?
add
border:1px#ccc solid
Post a Comment for "Python Module Pisa: How Change Background Color For All Page?"