Input

NameDescriptionRequired
HTML or URL InputEnter the HTML content or URL which you want to convert.Yes (unless HTML Template ID is used)
HTML Template IDSelect a Template ID from your HTML to PDF TemplatesYes (unless HTML or URL Input is used)
Page OrientationChoose the PDF page orientation.No
Page SizeSelect the paper size for the PDF.No
Custom Page SizeUse this instead of Page Size to specify a custom paper size for the PDF in width height format. You can use px, mm, cm or in units. For example: 200px 300px, 200mm 300mm, 20cm 30cm, or 6in 8in.No
Custom MarginsOverride the default margins. Specify the margins in the top right bottom left order. You can use px, mm, cm or in units. You can set margins for all sides at once using a single value, for example: 10px.No
Render Page BackgroundWhether to render the page background from the HTML source or not.No
Media TypeSelect Print or Screen quality for the PDF outputNo
Do not wait until full page loadSet to true to not wait for full page load. Helps speed up pages with dynamic content.No
HTML Template DataInput data for HTML templates. Accepts JSON or CSV format. For example, for JSON: '{ "total": "500" }', or for CSV: 'column1,column2,column3 value1,value2,value3'. If your template ID has variables this is how you can input data your into the PDF.No
NameThe output file name. If left blank then htmltopdf.pdf will be used.No
Custom ProfilesA JSON string which adds options for the conversion process. See API Profiles for more.No

Output

NameDescription
urlThe temporary URL on the PDF.co file server.
outputLinkValidTillA timestamp which indicates how long the url will be available for.
errorDetails of any errors (if any).
statusThe response status code. If all good this will be 200.
nameThe name of the file.
jobIdThe unique identifier for the job.
creditsThe credits spent on the process.
remainingCreditsThe credits left on your account.
durationThe time it took for the process.