Frequently Asked Question:
Is there a way to use a background color other than white when rendering a PDF?
I'm looking at Quick PDF and I'm interested to know if there a way to use a background color other than white when rendering a PDF?
The background color can be whatever you want it to be. Using the SetFillColor and DrawBox functions, you can draw a new background onto your PDF files with whatever color you like.
Here is some basic sample code that demonstrates how to draw a gray background on a new blank page:
QP.SetFillColor(0.5, 0.5, 0.5);
QP.SetOrigin(1);
QP.DrawBox(0, 0, QP.PageWidth(), QP.PageHeight(), 2);
QP.SaveToFile("background-color.pdf");
The "background-color.pdf" file will include nothing but the gray background. You can then add whatever other elements you want (text, images, etc) to the document.