Forum How do I...?

Color the entire PDF page with a given color

DolphinDream
How do I create a PDF that has the background of the entire page a certain color?

I tried to set the page background color but this only sets the color of the margins surrounding the page content.

See attached html / css and generate PDF.

Note the content background greenyellow surrounded by a white space then page background light blue.

Also depending on content and where the content ends or is broken from eone page to the next the bottom of the page has a larger white section (the page content does nto span down all the way to the bottom of the page area.
  1. Some Document.html17.3 kB
    html document
  2. Some Document.pdf21.7 kB
    the generated PDF
  3. style.less0.6 kB
    less / css file (used witvscode exension
mikeday
Your document includes an inline style rule that applies "background: #fff" to the html body element, you will need to remove this or override it in the style sheet.