PDFCraft
Render option

Render a PDF in landscape orientation

Rotate the paper to landscape orientation.

Fieldoptions.landscape
Typetrue | false
Defaultfalse

What it is for

Rotates the paper. Width and height swap; nothing else changes.

The trap

Rotating the paper does not rotate your layout. A table sized in vw or a fixed pixel width will not widen to fill the new page — set the width in CSS as well, or use a @page rule.

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": {
      "landscape": true,
      "format": "A4"
    }
  }' \
  --output out.pdf

Every option

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