API Basics
★  Fundamentals
★  Error Codes
★  Examples
★  Batch Processing
★  Specification
★  SDKs
Data Tools
Telephony
Geolocation
Security and Networking
E-commerce
Imaging

HTML5 Render

Render HTML content to PDF, JPG or PNG.

HTML5 render is based on the WebKit browser engine, this provides excellent rendering quality, full support for CSS3 and will even execute JavaScript code! The API operates in two main modes, render to PDF (the default) and render to image (JPG or PNG). When rendering out to an image you set the image dimensions using the "image-width" and "image-height" settings, the page related settings have no effect while in image mode.

NOTE
If your HTML page uses responsive CSS and has a mobile layout which you would like to render instead, set the "media-queries" option to emulate this. If you need to make minor adjustments to the page you can also pass some custom CSS in the "css" field which will override any CSS on the page. Another method to make rendering adjustments is by putting "@media print" CSS in the original document and setting the "media-print" option too.

End Point

https://neutrinoapi.com/html5-render
Test API
API Request
ParameterRequiredTypeDefaultDescription
contentYesstringThe HTML content. This can be either a URL to load HTML from or an actual HTML content string
formatNostringPDFWhich format to output, available options are: PDF, PNG, JPG
titleNostringThe document title
page-sizeNostringA4Set the document page size, can be one of: A0 - A9, B0 - B10, Comm10E, DLE or Letter
page-widthNointegerSet the PDF page width explicitly (in mm)
page-heightNointegerSet the PDF page height explicitly (in mm)
marginNointeger0The document margin (in mm)
margin-leftNointeger0The document left margin (in mm)
margin-rightNointeger0The document right margin (in mm)
margin-topNointeger0The document top margin (in mm)
margin-bottomNointeger0The document bottom margin (in mm)
landscapeNobooleanfalseSet the document to lanscape orientation
zoomNofloat1.0Set the zoom factor when rendering the page (2.0 for double size, 0.5 for half size)
grayscaleNobooleanfalseRender the final document in grayscale
media-printNobooleanfalseUse @media print CSS styles to render the document
media-queriesNobooleanfalseActivate all @media queries before rendering. This can be useful if you wan't to render the mobile version of a responsive website
formsNobooleanfalseGenerate real (fillable) PDF forms from HTML forms
cssNostringInject custom CSS into the HTML. e.g. 'body { background-color: red;}'
render-delayNointeger0Number of milliseconds to wait before rendering the page (can be useful for pages with animations etc)
image-widthNointeger1024If rendering to an image format (PNG or JPG) use this image width (in pixels)
image-heightNointegerIf rendering to an image format (PNG or JPG) use this image height (in pixels). The default is automatic which dynamically sets the image height based on the content
header-text-leftNostringText to print to the left-hand side header of each page. e.g. 'My header - Page {page_number} of {total_pages}'
header-text-centerNostringText to print to the center header of each page
header-text-rightNostringText to print to the right-hand side header of each page
header-sizeNointeger9The height of your header (in mm)
header-fontNostringCourierSet the header font. Fonts available: Times, Courier, Helvetica, Arial
header-font-sizeNointeger11Set the header font size (in pt)
header-lineNobooleanfalseDraw a full page width horizontal line under your header
footer-text-leftNostringText to print to the left-hand side footer of each page. e.g. 'My footer - Page {page_number} of {total_pages}'
footer-text-centerNostringText to print to the center header of each page
footer-text-rightNostringText to print to the right-hand side header of each page
footer-sizeNointeger9The height of your footer (in mm)
footer-fontNostringCourierSet the footer font. Fonts available: Times, Courier, Helvetica, Arial
footer-font-sizeNointeger11Set the footer font size (in pt)
footer-lineNobooleanfalseDraw a full page width horizontal line above your footer
API Response
Daily Limits
Free TierTier 1Tier 2Tier 3
101001,00010,000