Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Html2Pdf.app, send the page settings as fields in an authenticated JSON POST request to https://api.html2pdf.app/v1/generate. Choose a standard size with format, set landscape orientation separately with landscape, or provide both width and height in pixels for a custom size. Set each edge’s whitespace with marginTop, marginRight, marginBottom, and marginLeft.

Send page settings in the generation request

Html2Pdf.app documents a single authenticated POST request to its generation endpoint. Supply your API key in the X-API-Key header and send JSON. The html field can contain either a publicly reachable URL or raw HTML.

This example uses a URL and illustrative 24-pixel margins; it is not a tested request. Each margin defaults to 0, so include the margin fields you need rather than assuming a nonzero default.

POST https://api.html2pdf.app/v1/generate
X-API-Key: YOUR_API_KEY
Content-Type: application/json

{
  "html": "https://example.com/report",
  "format": "A4",
  "landscape": false,
  "marginTop": 24,
  "marginRight": 24,
  "marginBottom": 24,
  "marginLeft": 24
}

The endpoint and authentication format are documented in the Html2Pdf.app documentation; its cURL examples summarize the page-size and margin options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
  • 1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

Choose standard or custom page dimensions

Use a named paper format

Set format to a documented standard size when it matches your output. Available values are Letter, Legal, Tabloid, Ledger, and A0 through A6. The documented default is A4. Use the format value as a string.

Set custom dimensions in pixels

If none of the named sizes fits, provide both width and height as integer pixel values. The documentation treats them as a pair: neither field alone defines a complete custom page size. For example, "width": 1200 and "height": 800 specify dimensions in pixels; choose values appropriate to your output.

Rank #2
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
  • HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America. Each ream is wrapped in a polyurethane coated paper wrapper to protect the cut sheets from moisture damage
  • Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
  • HP Copy&Print20 20 pounds printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design)
  • All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment; 100% satisfaction guaranteed; ColorLok technology provides more vivid colors, bolder blacks and faster drying
  • Superior quality, reliability, and dependability for high-volume printing at home, at school and in the office; HP Copy&Print20 print and copy paper prevents yellowing over time to ensure a long-lasting appearance for added archival quality

Set orientation and margins independently

Choose portrait or landscape

Use landscape: true for landscape orientation. The documented default is false, which is portrait. Orientation is separate from selecting a standard format or supplying custom dimensions.

Control each edge’s whitespace

Margins are pixel values for the whitespace between the page edge and the content. Set any or all edges independently; the documented default for each is 0.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
  • 3 ream case (1,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing
Field Controls Documented default
marginTop Whitespace above content 0 pixels
marginRight Whitespace to the right of content 0 pixels
marginBottom Whitespace below content 0 pixels
marginLeft Whitespace to the left of content 0 pixels

Use different values where the document needs asymmetric spacing—for example, a larger left margin for binding—rather than treating the margins as one indivisible setting.

Check the rendered PDF before production

Html2Pdf.app says conversions run in headless Chromium, supporting modern HTML, CSS, and JavaScript. Output can still depend on CSS media mode, available fonts and other resources, and JavaScript load timing. Test representative documents, including the resources they rely on, before using the settings in production.

Rank #4
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
  • 5 ream case (2,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing
  • Verify the selected paper format or custom pixel dimensions and confirm the page orientation.
  • Inspect all four edges; a margin value applies to the PDF page, while the document’s own CSS can also affect its layout.
  • Check pages containing web fonts, images, or JavaScript-driven content for missing assets or content captured before it finishes loading.

Troubleshoot common page-size and margin problems

The page is not the intended size

Confirm that format uses one of the documented values. For a custom size, send both width and height as integer pixel values. Also check that the request is reaching the documented generation endpoint.

The PDF is portrait instead of landscape

Set landscape to the Boolean value true. Leaving it out uses the documented default, false.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 8 Reams (4,000 Sheets), 92 Bright White, Great for Crisp Ink Printing
  • 8 ream case (4,000 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

Content is too close to an edge

Set the corresponding margin field explicitly. Because each margin defaults to zero, omitted fields do not add whitespace. If the PDF still looks crowded, inspect the source HTML and its CSS as well as the PDF margins.

Fonts, images, or dynamic content look different

Check whether required resources are available to the conversion and whether scripts have completed when rendering occurs. The documentation identifies media mode, fonts and resources, and JavaScript timing as factors that can affect output; validate with a representative document.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your task is to capture a web page as an image rather than generate a paginated PDF, ScreenshotNeo offers a one-request screenshot API:

Quick Recap

Bestseller No. 1
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use; Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$6.97
Bestseller No. 2
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
$6.97
Bestseller No. 3
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$21.96
Bestseller No. 4
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$29.14
Bestseller No. 5
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 8 Reams (4,000 Sheets), 92 Bright White, Great for Crisp Ink Printing
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 8 Reams (4,000 Sheets), 92 Bright White, Great for Crisp Ink Printing
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$53.19
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/report -o shot.webp

See the ScreenshotNeo API documentation for request options. It removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.