Question: Capture HTML Canvas as gif/jpg/png/pdf? Is it possible to capture or print what's displayed in an html canvas as an image or PDF ? I'd like to generate an image form HTML file, and I'd like to be able to generate a png or other image formats from HTML. Is there an solution on VeryPDF?
Answer:According to your needs, maybe you can have a free trial of this software:VeryPDF Web page to PDF Converter Cloud API. By this cloud API, we can either convert HTML file to PDF or to image. When you choose output formats as image, this software supports like JPG, PNG, TIFF, BMP, GIF, TGA, PCX and many more. By this software, you can use this SVG file when rendering checked checkboxes, read and write cookies from and to the supplied cookie jar file, set height & height for cropping and other more. Please check more functions on Web Page to PDF & Image Converter Cloud API homepage introduction, in the following part, let us check how to use this software.
Step 1. Free registration an account on Cloud API website.
- Go to the registration page to register an account. Input a user name and your email address, and the click the Register button. Then you will get an temporary password and other account information in your email box.
- After log into your account, in the Account Info page, you will see your API key. By the API code, you can use this software freely.
- VeryPDF use Points to calculate your usage of API server resources or you can pay for this software per month or per year.
Step 2. Convert HTML to image or PDF by cloud API.
- When you use this software, please refer to the following link and examples:
When you need to convert HTML to PDF and specify output paper formats as A3, please refer to the following link:
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2pdf&infile=http://www.verydoc.com&outfile=verydoc.pdf&--page-size=A3
When you need to convert HTML to Image by this APIs, please refer to the following link:
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=https://www.verypdf.com&outfile=verypdf.jpg
When you need to specify output image height and width, please refer to the following link template:
http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=html2image&infile=https://www.verypdf.com&outfile=verypdf.jpg&--width=300&--height=300 - Now let us check more parameters of this software. simply change parameters at the end of the link then you can output different images or PDF.
--allow <path> Allow the file or files from the specified folder to be loaded (repeatable)
--checkbox-checked-svg <path> Use this SVG file when rendering checked checkboxes
--checkbox-svg <path> Use this SVG file when rendering unchecked checkboxes
--cookie <name> <value> Set an additional cookie (repeatable)
--cookie-jar <path> Read and write cookies from and to the supplied cookie jar file
--crop-h <int> Set height for cropping
--crop-w <int> Set width for cropping
--crop-x <int> Set x coordinate for cropping
--crop-y <int> Set y coordinate for cropping
--custom-header <name> <value> Set an additional HTTP header (repeatable)
--custom-header-propagation Add HTTP headers specified by --custom-header for each resource request.
--no-custom-header-propagation Do not add HTTP headers specified by --custom-header for each resource request.
--no-debug-javascript Do not show javascript debugging output (default)
As there are too many parameters of this software, I can not list all of them here. During the using if you have any question, please contact us as soon as possible.