Before you start, you should get yourself familiar with the article about performing file conversions via API.
You have few ways to start rendering the HTML page: from HTML-file or from URL.
HTML-file is suitable if the HTML file contains absolutely everything necessary to render the correct page. In this case, you may render the page via simple
$API->start() request and convert file from HTML to any other format.
If you need to render HTML with styles and images, which are located in distinct separate files - you should provide a link pointing to your page for rendering (i.e. start render via
In general, to render HTML page you should look into Quickstart example of our official PHP wrapper and compose code similar to this (Renders https://google.com/ page into the single PDF file):
<?php require_once 'autoload.php'; use \Convertio\Convertio; $API = new Convertio("_YOUR_API_KEY_"); $API->startFromURL('http://google.com/', 'pdf') // Convert (Render) HTML page to PDF ->wait() // Wait for conversion finish ->download('./google.pdf') // Download result To local file ->delete(); // Delete files from convertio.co hosts