Winnovative HTML to PDF Converter for Java

Features list itemConvert HTML to PDF in your Java Applications

Winnovative HTML to PDF Converter Box Winnovative HTML to PDF Converter Library for Java can be integrated in any Java application to convert URLs, HTML strings and streams to a PDF document, to a raster image or to a SVG vector image.

The converter offers full support for HTML tags, HTML5 with CSS3, SVG and Web Fonts, page breaks control, media type rules, repeating HTML table header and footer, hierarchical bookmarks, tables of contents, fillable PDF forms, HTML with page numbering in header and footer.

The library was designed and tested to work reliably in multithreaded environments and to completely release all the resources used during conversion after each conversion. This makes it suitable for usage in high traffic websites and services running a long period of time without interruption.

The software package you can download from our website contains demo applications to convert URLs and HTML strings to PDF, add multiple HTML documents to a single PDF document, convert HTML to raster images and convert HTML to SVG vector images.

The licensing model is simple and you can purchase a license online. A purchased license never expires, is royalties free and it includes free technical support and software update for 1 year from purchase date. You can purchase a HTML to PDF Converter license for all available platforms or you can purchase a license for Java library only at a lower price.

PurchasePurchase ContactSupport DownloadDownload

DownloadSoftware Download

Winnovative HTML to PDF Converter for Java is distributed in a Zip archive. You can follow the link below to download the software. The Zip archive contains the client library for Java as a JAR file for JRE 1.6 or newer, the API documentation in HTML format, the HTML to PDF Server and the demo applications for Java.

InstallationSoftware Installation

In order to use the Winnovative HTML to PDF Converter for Java you first have to install the Winnovative HTML to PDF Server. The server was built on .NET library to extend its capabilities to other platforms and languages. The JAR library that you link in your Java application will connect to the server to convert HTML to PDF, to Image or to SVG.

Winnovative HTML to PDF Converter Server can run either in a Windows Service on a Windows machine or in an Azure Cloud Service deployed in Microsoft Azure cloud. You can find detailed installation and uninstallation instructions in the Readme.txt file from the root of the downloaded package.

Code Sample IconJava Code Sample

The Winnovative HTML to PDF Converter for Java API allows you to convert a HTML document to PDF in just a few lines a code. The programming interface is also very rich and allows you customize the generated PDF document in various ways. The code below is copied from the Getting Started demo for HTML to PDF Converter that you can find the in the samples folder of the software Zip package.

private byte[] convertHtmlToPdf(boolean convertURL) throws Exception 
    String serverIP = textServerIP.getText();
    int port = Integer.parseInt(textServerPort.getText());

    // create the HTML to PDF converter
    HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter(serverIP, port);

    // set license key

    // set service password if necessary
    if (textServicePassword.getText().length() > 0)

    // set HTML viewer width
    int viewerWidth = Integer.parseInt(textHtmlViewerWidth.getText());

    // set HTML viewer height if necessary
    if (textHtmlViewerHeight.getText().length() > 0) {
	    int viewerHeight = Integer.parseInt(textHtmlViewerHeight.getText());

    // set navigation timeout
    int navigationTimeout = Integer.parseInt(textHtmlViewerWidth.getText());

    // set conversion delay if necessary
    if (textConversionDelay.getText().length() > 0) {
	    int conversionDelay = Integer.parseInt(textConversionDelay.getText());

    // set PDF page size

    // set PDF page orientation

    // set margins
    int leftMargin = Integer.parseInt(textLeftMargin.getText());

    int rightMargin = Integer.parseInt(textRightMargin.getText());

    int topMargin = Integer.parseInt(textTopMargin.getText());

    int bottomMargin = Integer.parseInt(textBottomMargin.getText());

    // add header
    if (chckbxAddHeader.isSelected()) {
	    drawHeader(htmlToPdfConverter, true);

    // add footer
    if (chckbxAddFooter.isSelected()) {
	    drawFooter(htmlToPdfConverter, true, true);

    byte[] outPdfBuffer = null;

    if (convertURL) {
	    // convert URL to PDF

	    String urlToConvert = textUrl.getText();

	    outPdfBuffer = htmlToPdfConverter.convertUrl(urlToConvert);
    } else {
	    // convert HTML to PDF

	    String html = textHtml.getText();
	    String baseUrl = textBaseUrl.getText();

	    outPdfBuffer = htmlToPdfConverter.convertHtml(html, baseUrl);

    return outPdfBuffer;