HTM to PDF API
The API for converting HTML files to PDF files using Google Chrome browser.
The API for converting HTML files to PDF files.
HTTP authentication username. Could be used if conversion web page is protected with HTTP authentication.
HTTP authentication password. Could be used if conversion web page is protected with HTTP authentication.
Set additional cookies for the page request. Exaple:
cookiename1=cookievalue1; cookiename2=cookievalue2; cookiename3=cookievalue3
Delay in seconds before page load and PDF creation. Sometimes useful to let web page fully load.
Element selector string of the DOM element. Converter will wait for this element to appear in DOM before conversion begins.
Element selector string of the DOM elements that needs to be hidden during conversion.
Use CSS media type in conversion process. The default screen and print media types are supported but not limited to these. The custom media type, like convertapi can be used too.
Change fixed elements CSS 'position' property to adapt page for conversion.
Element selector string of the DOM elements that should be visible during conversion. Other elements will be hidden.
If true, the converter will generate PDF as the content looks like in the browser. If is set to false, the converter acts like Chrome print to PDF function.
Adds a HTML header to every page. HTML tags with the classes 'pageNumber', 'totalPages', 'title', 'date' will be injected with the page metadata. Use inline CSS to style provided HTML.
Adds a HTML footer to every page. HTML tags with the classes 'pageNumber', 'totalPages', 'title', 'date' will be injected with the page metadata. Use inline CSS to style provided HTML.
PDF page size.
Custom page width in millimeters (mm). This option override PageSize option.
Custom page height in millimeters (mm). This option override PageSize option.
It tries to produce smaller output files but requires Adobe Reader 6, released in 2003 or newer, to view created PDF files.
Code snippet
// Code snippet is using the ConvertAPI JavaScript Client: https://github.com/ConvertAPI/convertapi-js
// Code snippet is using the ConvertAPI Node.js Client: https://github.com/ConvertAPI/convertapi-nodejs
// Code snippet is using the ConvertAPI PHP Client: https://github.com/ConvertAPI/convertapi-php
// Code snippet is using the ConvertAPI Java Client: https://github.com/ConvertAPI/convertapi-java
// Code snippet is using the ConvertAPI C# Client: https://github.com/ConvertAPI/convertapi-dotnet
# Code snippet is using the ConvertAPI Ruby Client: https://github.com/ConvertAPI/convertapi-ruby
# Code snippet is using the ConvertAPI Python Client: https://github.com/ConvertAPI/convertapi-python
// Code snippet is using the ConvertAPI Go Client: https://github.com/ConvertAPI/convertapi-go
REM Code snippet is using the command line utility program: https://github.com/ConvertAPI/convertapi-cli
<!-- For conversions with the multiple file result please refer to this example: https://repl.it/@ConvertAPI/HTML-Form-with-multiple-file-result -->