PDFCraft
Render option

Render a page as screen instead of print

Which CSS media type the page sees.

Fieldoptions.emulateMedia
Typeprint | screen
Default"print"

What it is for

Which CSS media type the page believes it is being rendered for. Defaults to print, which is what a PDF is.

The trap

Set this to screen when a site has a print stylesheet that strips the thing you are trying to capture — navigation, a chart, a background. Plenty of sites hide most of the page under @media print.

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": {
      "emulateMedia": "screen"
    }
  }' \
  --output out.pdf

Every option

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