Page Formats

Paper sizes and custom page dimensions.

Page Formats

Choose the right paper format for your PDF documents. PDF API supports standard paper sizes and custom dimensions.


Standard Formats

ISO A Series

FormatDimensions (mm)Dimensions (in)Use Case
A3297 × 42011.7 × 16.5Posters, diagrams
A4210 × 2978.3 × 11.7Standard documents
A5148 × 2105.8 × 8.3Booklets, flyers

US Formats

FormatDimensions (in)Dimensions (mm)Use Case
Letter8.5 × 11216 × 279Standard US documents
Legal8.5 × 14216 × 356Legal documents
Tabloid11 × 17279 × 432Newspapers, posters

Using Standard Formats

{
  "markdown": "# Document",
  "options": {
    "format": "A4"
  }
}

With landscape orientation:

{
  "options": {
    "format": "A4",
    "landscape": true
  }
}

Custom Dimensions

For non-standard sizes, specify width and height:

{
  "options": {
    "width": "6in",
    "height": "9in"
  }
}

Supported Units

UnitExampleDescription
mm210mmMillimeters
cm21cmCentimeters
in8.5inInches
px794pxPixels (96 DPI)

Common Custom Sizes

Books & Publications

TypeWidthHeightAspect
Pocket Book4.25in6.87in0.62
Trade Paperback5.5in8.5in0.65
US Trade6in9in0.67
Royal6.14in9.21in0.67
Digest5.5in8.5in0.65
{
  "options": {
    "width": "6in",
    "height": "9in"
  }
}

Marketing Materials

TypeWidthHeight
Business Card3.5in2in
Postcard6in4in
Flyer (Half Letter)5.5in8.5in
Brochure (Tri-fold)8.5in11in
{
  "options": {
    "width": "6in",
    "height": "4in",
    "landscape": true
  }
}

Social Media

PlatformWidthHeightNotes
Instagram Post1080px1080pxSquare
Instagram Story1080px1920px9:16
Facebook Cover820px312pxBanner
{
  "options": {
    "width": "1080px",
    "height": "1080px"
  }
}

Portrait vs Landscape

Portrait (Default)

Content flows top to bottom, best for documents with mostly text.

{
  "options": {
    "format": "A4",
    "landscape": false
  }
}

Landscape

Content flows with wider width, best for tables, charts, and presentations.

{
  "options": {
    "format": "A4",
    "landscape": true
  }
}
ModeA4 WidthA4 Height
Portrait210mm297mm
Landscape297mm210mm

Content Area Calculation

Calculate the usable content area by subtracting margins:

Content Width = Page Width - Left Margin - Right Margin
Content Height = Page Height - Top Margin - Bottom Margin - Header - Footer

Example: A4 with Standard Margins

PropertyValue
Page Width210mm
Page Height297mm
Left/Right Margins20mm each
Top/Bottom Margins25mm each
Content Width170mm
Content Height247mm

Best Practices

  1. Match your audience: Use Letter for US, A4 for international
  2. Consider printing: Standard formats are easier to print
  3. Account for binding: Add extra margin on the binding edge for booklets
  4. Test margins: Ensure content doesn't get cut off near edges
  5. Use landscape for data: Tables and charts often fit better in landscape

Examples by Use Case

Invoice (US)

{
  "template": "invoice",
  "options": {
    "format": "Letter",
    "margin": {
      "top": "25mm",
      "bottom": "25mm",
      "left": "20mm",
      "right": "20mm"
    }
  }
}

Report with Charts

{
  "options": {
    "format": "A4",
    "landscape": true,
    "margin": {
      "top": "15mm",
      "bottom": "15mm",
      "left": "15mm",
      "right": "15mm"
    }
  }
}

Book Chapter

{
  "options": {
    "width": "6in",
    "height": "9in",
    "margin": {
      "top": "20mm",
      "bottom": "20mm",
      "left": "25mm",
      "right": "15mm"
    }
  }
}