GrabzIt
Tools to Capture and Convert the Web

GrabzIt's HTML to PDF and Image APIHTML to PDF and Image API

In addition to being able to convert URL's GrabzIt's API can also convert HTML to PDF's and images. When the HTML is converted it uses a browser instance to ensure that any CSS, JavaScript or other resources contained within the HTML is rendered properly.

However any resources that references a URL on another server must use an absolute URL otherwise the resource won't be able to resolve. For instance you should use http://www.example.com/mystyle.css rather than mystyle.css

HTML


to PDF

As you can see in the demo above, using the HTML to PDF or Image API allows developers to create any thing they can imagine and then have it accurately converted into an image or PDF.

HTML to PDF API

GrabzIt can easily enable your app to convert HTML to a PDF in eight programming languages. Just choose your required programming language below and follow the instructions.

The example code below shows how easy it is to convert HTML to a PDF using ASP.NET. To start creating PDF's just download the ASP.NET Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for ASP.NET to find out all the ways you can use GrabzIt's API.

GrabzItClient grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
grabzIt.HTMLToPDF("<html><body><h1>Hello World!</h1></body></html>"); 
grabzIt.SaveTo("documents/result.pdf");

The example code below shows how easy it is to convert HTML to a PDF using Java. To start creating PDF's just download the Java Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Java to find out all the ways you can use GrabzIt's API.

GrabzItClient grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
grabzIt.HTMLToPDF("<html><body><h1>Hello World!</h1></body></html>"); 
grabzIt.SaveTo("documents/result.pdf");

The example code below shows how easy it is to convert HTML to a PDF using JavaScript. To start creating PDF's download GrabzIt's JavaScript Library. Then get your Application Key and Secret, add the domain you want to use the JavaScript on and then check out the API documentation for JavaScript to find out all the ways you can use GrabzIt's API.

<script src="grabzit.min.js"></script>
<script>
GrabzIt("APPLICATION KEY").ConvertHTML("<html><body><h1>Hello World!</h1></body></html>",
{"format": "pdf"}).Create();
</script>

The example code below shows how easy it is to convert HTML to a PDF using Node.js. To start creating PDF's just download the Node.js Package, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Node.js to find out all the ways you can use GrabzIt's API.

var grabzit = require('grabzit');

var client = new grabzit("APPLICATION KEY", "APPLICATION SECRET");
client.html_to_pdf("<html><body><h1>Hello World!</h1></body></html>");
client.save_to("documents/result.pdf");

The example code below shows how easy it is to convert HTML to a PDF using Perl. To start creating PDF's just download the Perl Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Perl to find out all the ways you can use GrabzIt's API.

#!/usr/bin/perl

use GrabzItClient;

$grabzIt = GrabzItClient->new("APPLICATION KEY", "APPLICATION SECRET");
$grabzIt->HTMLToPDF("<html><body><h1>Hello World!</h1></body></html>");
$grabzIt->SaveTo("documents/result.pdf");

The example code below shows how easy it is to convert HTML to a PDF using PHP. To start creating PDF's just download the PHP Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for PHP to find out all the ways you can use GrabzIt's API.

include("GrabzItClient.class.php");

$grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
$grabzIt->HTMLToPDF("<html><body><h1>Hello World!</h1></body></html>"); 
$grabzIt->SaveTo("documents/result.pdf");

The example code below shows how easy it is to convert HTML to a PDF using Python. To start creating PDF's just download the Python Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Python to find out all the ways you can use GrabzIt's API.

import GrabzItClient

grabzIt = GrabzItClient.GrabzItClient("APPLICATION KEY", "APPLICATION SECRET")
grabzIt.HTMLToPDF("<html><body><h1>Hello World!</h1></body></html>") 
grabzIt.SaveTo("documents/result.pdf") 

The example code below shows how easy it is to convert HTML to a PDF using Ruby. To start creating PDF's just download the Ruby Gem, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Ruby to find out all the ways you can use GrabzIt's API.

require 'grabzit'

grabzItClient = GrabzIt::Client.new("APPLICATION KEY", "APPLICATION SECRET")
grabzItClient.html_to_pdf("<html><body><h1>Hello World!</h1></body></html>")	
grabzItClient.save_to("documents/result.pdf") 	

HTML to Image API

Use GrabzIt to allow your app to convert HTML to an Image in eight different programming languages. Just choose the programming language you need to use below and follow the instructions.

The example code below shows how easy it is convert HTML to an image using ASP.NET. To start creating images just download the ASP.NET Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for ASP.NET to find out all the ways you can use GrabzIt's API.

GrabzItClient grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>"); 
grabzIt.SaveTo("images/result.jpg");

The example code below shows how easy it is to convert HTML to an image using Java. To start creating images just download the Java Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Java to find out all the ways you can use GrabzIt's API.

GrabzItClient grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>"); 
grabzIt.SaveTo("images/result.jpg");

The example code below shows how easy it is to convert HTML to an image using JavaScript. To start creating images download GrabzIt's JavaScript Library. Then get your Application Key and Secret, add the domain you want to use the JavaScript on and then check out the API documentation for JavaScript to find out all the ways you can use GrabzIt's API.

<script src="grabzit.min.js"></script>
<script>
GrabzIt("APPLICATION KEY").ConvertHTML("<html><body><h1>Hello World!</h1></body></html>").Create();
</script>

The example code below shows how easy it is to convert HTML to an image using Node.js. To start creating images just download the Node.js Package, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Node.js to find out all the ways you can use GrabzIt's API.

var grabzit = require('grabzit');

var client = new grabzit("APPLICATION KEY", "APPLICATION SECRET");
client.html_to_image("<html><body><h1>Hello World!</h1></body></html>");
client.save_to("images/result.jpg");

The example code below shows how easy it is to convert HTML to an image using Perl. To start creating images just download the Perl Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Perl to find out all the ways you can use GrabzIt's API.

#!/usr/bin/perl

use GrabzItClient;

$grabzIt = GrabzItClient->new("APPLICATION KEY", "APPLICATION SECRET");
$grabzIt->HTMLToImage("<html><body><h1>Hello World!</h1></body></html>");
$grabzIt->SaveTo("images/result.jpg");

The example code below shows how easy it is to convert HTML to an image using PHP. To start creating images just download the PHP Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for PHP to find out all the ways you can use GrabzIt's API.

include("GrabzItClient.class.php");

$grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
$grabzIt->HTMLToImage("<html><body><h1>Hello World!</h1></body></html>"); 
$grabzIt->SaveTo("images/result.jpg");

The example code below shows how easy it is to convert HTML to an image using Python. To start creating images just download the Python Library, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Python to find out all the ways you can use GrabzIt's API.

import GrabzItClient

grabzIt = GrabzItClient.GrabzItClient("APPLICATION KEY", "APPLICATION SECRET")
grabzIt.HTMLToImage("<html><body><h1>Hello World!</h1></body></html>") 
grabzIt.SaveTo("images/result.jpg") 

The example code below shows how easy it is to convert HTML to an image using Ruby. To start creating images just download the Ruby Gem, get your Application Key and Secret and then use the demo contained within. Then check out the API documentation for Ruby to find out all the ways you can use GrabzIt's API.

require 'grabzit'

grabzItClient = GrabzIt::Client.new("APPLICATION KEY", "APPLICATION SECRET")
grabzItClient.html_to_image("<html><body><h1>Hello World!</h1></body></html>")	
grabzItClient.save_to("images/result.jpg") 	
Try all our premium features for free with a 7 day free trial. Then from $5.99 a month, unless cancelled.
  • More Captures
  • More Features
  • More API's
  • Bigger Scrapes
  • Bigger Screenshots
  • Bigger Everything
Start Free Trial