Inkit Render is an HTML to PDF REST API that allows layering document conversion functionality into existing software. After integration, the software can automatically run HTML to PDF conversion and retrieve the generated PDFs upon request.
Render HTML to PDF REST API supports integration with solutions written in all core programming languages, including cURL. cURL, in its turn, is compatible with almost any hardware and platform. Hence, you can automatically convert HTML to PDF using cURL in most applications. For example, you can utilize it for PHP cURL get page content commands, or PHP CURL PDF retrieve.
This tutorial explains how to use cURL in Render HTML to PDF REST API. Follow our guidelines to convert HTML code to PDF files and automate PDF document retrieval.
Set Up the HTML to PDF Rest API
Start with Render’s HTML to PDF REST API integration. Before configuring PHP cURL PDF or any other conversion, you need to connect Inkit.
To create an account and complete the integration, follow this link. You can register with your Google, GitHub, and Microsoft account or email.
Once you create an account, retrieve your API key. Make sure to store the key since you will need to indicate it while setting up document rendering.
Select the desired programming language to customize the boilerplate code. To convert HTML to PDF using cURL, we chose cURL. Render automatically formats the code snippet so you can copy and paste it into the environment.
At this stage, you can also set up user roles. They help you control access to the functionality of the HTML to PDF REST API and distribute document management tasks among teams.
How to Create PDF from HTML with cURL
To automate cURL HTML to PDF creation in Render PDF engine:
- Go to the Create section of Render HTML to PDF REST API.
- Choose cURL as a programming language to automatically format the code snippet. It will look like this:
- Change the standard body parameters to convert HTML to PDF of irregular size. It automatically edits the width and height values in the code snippet.
- Fill in the expire_after_n_views, expire_at, template_id, and render_completed_webhook parameters to set document management rules.
- Enter your unique API key in X-Inkit-API-Token.
- Copy the final cURL snippet and paste it into the environment for high-quality automated HTML to PDF conversion.
How to Retrieve PDF from HTML with cURL
Render HTML to PDF REST API enables users to download the generated PDF documents. The Retrieve PDF request works similarly to Create. Follow the next steps to configure and run it:
- Go to the Retrieve PDF section of Render HTML to PDF REST API.
- Select cURL as a programming language to change the standard code formatting. It will look like this:
- Enter the Render ID in the PATH PARAM section.
- Enter the API key in the HEADERS section.
- Copy the final cURL snippet and paste it into your environment to enable file download after HTML to PDF conversion.
Retrieve Metadata About HTML to PDF Conversions Using cURL
Render HTML to PDF REST API doesn’t only allow converting HTML to PDF and retrieving it. You can also obtain the metadata about the rendered files and the conversion instance. This information includes the document description, author, conversion date, rendering software, and other valuable details. They help to manage the generated PDFs and track the ownership of the documents.
To get the metadata, you will need to run the Retrieve request. Go to the Retrieve section of Render HTML to PDF API > Select cURL > Enter the desired parameters > Copy the customized snippet and run it to retrieve the metadata information.
About Inkit Render HTML to PDF REST API
Inkit Render is an HTML to PDF REST API provided along with other products in Inkit REP (Reach Enablement Platform). Software development teams can integrate it with existing applications to implement high-quality HTML to PDF rendering. It allows avoiding lengthy custom software development and cuts expenses. Since Inkit Render supports a broad range of programming languages, it works smoothly with almost every application. Our HTML to PDF REST API enables you to assign user roles and supports high-res image rendering, which other rendering solutions don’t offer.
Check out the Render pricing plans and FAQs here to learn more about the tool.