TMCnet Feature
June 15, 2020

GrabzIt's API for HTML To PDF conversion

GrabzIt has been providing many Web scraping tools and URLs converting APIs to help us adapt our ways in the world of Web. GrabzIt just not preferred to covert URLs only, it also provides API that can use to convert HTML to PFD for free. 

How does it work?

The mechanism GrabzIt uses is effortless. It coverts the HTML by using an instance created by your web browser. In this way, any reference or resources attached to the HTML will not be formatted during the conversion, whether the rendered properties are CSS (News - Alert), JavaScript, Flash player, SVG, web fonts, or even the videos.

The API works with programming languages, but the target resources must not be in-lined in the HTML you are using. The HTML must be used as a reference by using the original or absolute URL for GrabzIt to render it into the PDF file.

For example, if a CSS file is to be converted by GrabzIt, you must create an instance using the following URL:

instead of just the name of the data that is mycssfile.css

The instance created by such a method will be a reference to HTML code, which can easily be converted into a PDF downloadable file.


GrabzIt has made your approach to Web as easy as pressing a button. The rocket science behind converting an HTML file to PDF has been solved using this specific API. This API can be used on the following eight different programming languages:

  • ASP. NET (News - Alert)
  • JAVA
  • JavaScript
  • Node.js
  • Perl
  • PHP
  • Python
  • Ruby

Grabzit has provided API documentation on all of the programming languages with general instruction for your ease.

How to use GrabzIt API:

GrabzIt API is straightforward to use, and it can convert HTML to PDF and images by using any of the eight programming languages by following easy steps:

  1. All you have to do is download the relevant programming languages' Library for GrabzIt website first.
  2. Then get your key and secret code.
  3. JavaScript language may require you to add the domain of you want to use the API. This step can be skipped for seven other languages.
  4. Use the demo enclosed in the document, you have to change the file name to your targeted file, and your file is ready to be converted.
  5. Finally, Read the API documentation for the language provided on GtabzIt’s website for the appropriate programming language to understand your options. And believe us when we say the prospects are handy and very useful.

Do keep in mind that if you are using a server-side language like PHP and have HTML or HTM files, it can also be generated as a PDF. You need to use an appropriate File-to- PDF conversion method for the specific programming language you are using.

» More TMCnet Feature Articles


» More TMCnet Feature Articles