PDFCraft
Render option

Keep background colours and images in a PDF

Print background colours and images. Off by default in browsers; on by default here.

Fieldoptions.printBackground
Typetrue | false
Defaulttrue

What it is for

Whether backgrounds are painted. Chromium omits them by default — the browser print dialog does the same thing, on the theory that you do not want to spend ink on them.

The trap

Almost every invoice, report and certificate wants this ON. A design with a coloured header bar that renders as plain white is this option, nine times in ten.

Example

curl -X POST https://api.pdfcraft.dev/v1/render \
  -H "Authorization: Bearer $PDFCRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<h1>hello</h1>",
    "options": {
      "printBackground": true
    }
  }' \
  --output out.pdf

Every option

Try any of these in the playground without writing a line of code, or read the full reference.