HTML to Image API - Java SDK

Convert web pages and HTML documents to various image formats in Java using the Pdfcrowd API v2. The API is easy to use and the integration takes only a couple of lines of code.

Installation

Download pdfcrowd-4.3.3-java.zip, unzip it and copy pdfcrowd-4.3.3.jar to your CLASSPATH.

You can learn more about other install options (Maven, GitHub) here.

Authentication

Authentication is needed in order to use the Pdfcrowd API. The credentials used for accessing the API are your Pdfcrowd username and the API key. You can sign up for the Pdfcrowd API here.

Examples

Convert a web page to a PNG file
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // run the conversion and write the result to a file
            client.convertUrlToFile("http://www.example.com", "example.png");
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a web page to in-memory PNG
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // create output file for conversion result
            FileOutputStream output_file = new FileOutputStream("example.png");

            // run the conversion and store the result into an image variable
            byte[] image = client.convertUrl("http://www.example.com");

            // write the image the into the output file
            output_file.write(image);

            // close the output file
            output_file.close();
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a web page and write the resulting PNG to an output stream
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // create output stream for conversion result
            FileOutputStream output_stream = new FileOutputStream("example.png");

            // run the conversion and write the result into the output stream
            client.convertUrlToStream("http://www.example.com", output_stream);

            // close the output stream
            output_stream.close();
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a local HTML file to a PNG file
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // run the conversion and write the result to a file
            client.convertFileToFile("/path/to/MyLayout.html", "MyLayout.png");
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a local HTML file to in-memory PNG
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // create output file for conversion result
            FileOutputStream output_file = new FileOutputStream("MyLayout.png");

            // run the conversion and store the result into an image variable
            byte[] image = client.convertFile("/path/to/MyLayout.html");

            // write the image the into the output file
            output_file.write(image);

            // close the output file
            output_file.close();
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a local HTML file and write the resulting PNG to an output stream
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // create output stream for conversion result
            FileOutputStream output_stream = new FileOutputStream("MyLayout.png");

            // run the conversion and write the result into the output stream
            client.convertFileToStream("/path/to/MyLayout.html", output_stream);

            // close the output stream
            output_stream.close();
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a string containing HTML to a PNG file
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // run the conversion and write the result to a file
            client.convertStringToFile("<html><body><h1>Hello World!</h1></body></html>", "HelloWorld.png");
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a string containing HTML to in-memory PNG
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // create output file for conversion result
            FileOutputStream output_file = new FileOutputStream("HelloWorld.png");

            // run the conversion and store the result into an image variable
            byte[] image = client.convertString("<html><body><h1>Hello World!</h1></body></html>");

            // write the image the into the output file
            output_file.write(image);

            // close the output file
            output_file.close();
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Convert a string containing HTML and write the resulting PNG to an output stream
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");

            // create output stream for conversion result
            FileOutputStream output_stream = new FileOutputStream("HelloWorld.png");

            // run the conversion and write the result into the output stream
            client.convertStringToStream("<html><body><h1>Hello World!</h1></body></html>", output_stream);

            // close the output stream
            output_stream.close();
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}
Get info about the current conversion
import com.pdfcrowd.*;
import java.io.*;

public class ApiTest {
    public static void main(String[] args) throws IOException, Pdfcrowd.Error {
        try {
            // create the API client instance
            Pdfcrowd.HtmlToImageClient client = new Pdfcrowd.HtmlToImageClient("your_username", "your_apikey");

            // configure the conversion
            client.setOutputFormat("png");
            client.setDebugLog(true);

            // run the conversion and write the result to a file
            client.convertFileToFile("/path/to/MyLayout.html", "MyLayout.png");
            
            // print URL to the debug log
            System.out.println("Debug log url: " + client.getDebugLogUrl());
            
            // print the number of available conversion credits in your account
            System.out.println("Remaining credit count: " + client.getRemainingCreditCount());
            
            // print the number of credits consumed by the conversion
            System.out.println("Consumed credit count: " + client.getConsumedCreditCount());
            
            // print the unique ID of the conversion
            System.out.println("Job id: " + client.getJobId());
            
            // print the size of the output in bytes
            System.out.println("Output size: " + client.getOutputSize());
        }
        catch(Pdfcrowd.Error why) {
            // report the error
            System.err.println("Pdfcrowd Error: " + why);

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
        catch(IOException why) {
            // report the error
            System.err.println("IO Error: " + why.getMessage());

            // handle the exception here or rethrow and handle it at a higher level
            throw why;
        }
    }
}

Tips & Tricks

The API lets you convert a web page, a local HTML file, or a string containing HTML. The result of the conversion can be stored to a local file, to a stream object or to a variable. See the conversion input section for more details.

The best way to start with the API is to choose one of the examples and once you get it working, you can:

You can also use these HTML related features:

  • You can use the following classes in your HTML code which hide/remove elements from the output:
    • pdfcrowd-remove - sets display:none on the element
    • pdfcrowd-hide - sets visibility:hidden on the element
  • You can switch to the print version of the page (if it exists) with setUsePrintMedia.
  • You can force a page break with
    <div style="page-break-before:always"></div>
  • You can avoid a page break inside an element with the following CSS
    img { page-break-inside:avoid }
  • You can use setCustomJavascript to alter the HTML contents with a custom JavaScript.

API Reference - class HtmlToImageClient

Conversion from HTML to image.

Constructor

public HtmlToImageClient(String userName, String apiKey)
Constructor for the Pdfcrowd API client.
Parameter Description Default
userName
Your username at Pdfcrowd.
apiKey
Your API key.

 

Conversion Format

public HtmlToImageClient setOutputFormat(String outputFormat)
The format of the output file.
Parameter Description Default
outputFormat
Allowed values:
  • png
  • jpg
  • gif
  • tiff
  • bmp
  • ico
  • ppm
  • pgm
  • pbm
  • pnm
  • psb
  • pct
  • ras
  • tga
  • sgi
  • sun
  • webp
png
Returns
  • HtmlToImageClient - The converter object.

 

Conversion Input

public byte[] convertUrl(String url)
Convert a web page.
Parameter Description Default
url
The address of the web page to convert.
The supported protocols are http:// and https://.
Returns
  • byte[] - Byte array containing the conversion output.
public void convertUrlToStream(String url, OutputStream outStream)
Convert a web page and write the result to an output stream.
Parameter Description Default
url
The address of the web page to convert.
The supported protocols are http:// and https://.
outStream
The output stream that will contain the conversion output.
public void convertUrlToFile(String url, String filePath) throws IOException
Convert a web page and write the result to a local file.
Parameter Description Default
url
The address of the web page to convert.
The supported protocols are http:// and https://.
filePath
The output file path.
The string must not be empty.
public byte[] convertFile(String file)
Convert a local file.
Parameter Description Default
file
The path to a local file to convert.
The file can be either a single file or an archive (.tar.gz, .tar.bz2, or .zip).
If the HTML document refers to local external assets (images, style sheets, javascript), zip the document together with the assets.
The file must exist and not be empty.
The file name must have a valid extension.
Returns
  • byte[] - Byte array containing the conversion output.
public void convertFileToStream(String file, OutputStream outStream)
Convert a local file and write the result to an output stream.
Parameter Description Default
file
The path to a local file to convert.
The file can be either a single file or an archive (.tar.gz, .tar.bz2, or .zip).
If the HTML document refers to local external assets (images, style sheets, javascript), zip the document together with the assets.
The file must exist and not be empty.
The file name must have a valid extension.
outStream
The output stream that will contain the conversion output.
public void convertFileToFile(String file, String filePath) throws IOException
Convert a local file and write the result to a local file.
Parameter Description Default
file
The path to a local file to convert.
The file can be either a single file or an archive (.tar.gz, .tar.bz2, or .zip).
If the HTML document refers to local external assets (images, style sheets, javascript), zip the document together with the assets.
The file must exist and not be empty.
The file name must have a valid extension.
filePath
The output file path.
The string must not be empty.
public byte[] convertString(String text)
Convert a string.
Parameter Description Default
text
The string content to convert.
The string must not be empty.
Returns
  • byte[] - Byte array containing the conversion output.
public void convertStringToStream(String text, OutputStream outStream)
Convert a string and write the output to an output stream.
Parameter Description Default
text
The string content to convert.
The string must not be empty.
outStream
The output stream that will contain the conversion output.
public void convertStringToFile(String text, String filePath) throws IOException
Convert a string and write the output to a file.
Parameter Description Default
text
The string content to convert.
The string must not be empty.
filePath
The output file path.
The string must not be empty.

 

General Options

public HtmlToImageClient setNoBackground(boolean noBackground)
Do not print the background graphics.
Parameter Description Default
noBackground
Set to true to disable the background graphics.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setDisableJavascript(boolean disableJavascript)
Do not execute JavaScript.
Parameter Description Default
disableJavascript
Set to true to disable JavaScript in web pages.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setDisableImageLoading(boolean disableImageLoading)
Do not load images.
Parameter Description Default
disableImageLoading
Set to true to disable loading of images.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setDisableRemoteFonts(boolean disableRemoteFonts)
Disable loading fonts from remote sources.
Parameter Description Default
disableRemoteFonts
Set to true disable loading remote fonts.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setBlockAds(boolean blockAds)
Try to block ads. Enabling this option can produce smaller output and speed up the conversion.
Parameter Description Default
blockAds
Set to true to block ads in web pages.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setDefaultEncoding(String defaultEncoding)
Set the default HTML content text encoding.
Parameter Description Default
defaultEncoding
The text encoding of the HTML content.
auto detect
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setHttpAuth(String userName, String password)
Set credentials to access HTTP base authentication protected websites.
Parameter Description Default
userName
Set the HTTP authentication user name.
password
Set the HTTP authentication password.
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setUsePrintMedia(boolean usePrintMedia)
Use the print version of the page if available (@media print).
Parameter Description Default
usePrintMedia
Set to true to use the print version of the page.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setNoXpdfcrowdHeader(boolean noXpdfcrowdHeader)
Do not send the X-Pdfcrowd HTTP header in Pdfcrowd HTTP requests.
Parameter Description Default
noXpdfcrowdHeader
Set to true to disable sending X-Pdfcrowd HTTP header.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setCookies(String cookies)
Set cookies that are sent in Pdfcrowd HTTP requests.
Parameter Description Default
cookies
The cookie string.
Returns
  • HtmlToImageClient - The converter object.
Examples:
  • setCookies("session=6d7184b3bf35;token=2710")
public HtmlToImageClient setVerifySslCertificates(boolean verifySslCertificates)
Do not allow insecure HTTPS connections.
Parameter Description Default
verifySslCertificates
Set to true to enable SSL certificate verification.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setFailOnMainUrlError(boolean failOnError)
Abort the conversion if the main URL HTTP status code is greater than or equal to 400.
Parameter Description Default
failOnError
Set to true to abort the conversion.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setFailOnAnyUrlError(boolean failOnError)
Abort the conversion if any of the sub-request HTTP status code is greater than or equal to 400.
Parameter Description Default
failOnError
Set to true to abort the conversion.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setCustomJavascript(String customJavascript)
Run a custom JavaScript after the document is loaded. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...).
Parameter Description Default
customJavascript
String containing a JavaScript code.
The string must not be empty.
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setCustomHttpHeader(String customHttpHeader)
Set a custom HTTP header that is sent in Pdfcrowd HTTP requests.
Parameter Description Default
customHttpHeader
A string containing the header name and value separated by a colon.
Returns
  • HtmlToImageClient - The converter object.
Examples:
  • setCustomHttpHeader("X-My-Client-ID:k2017-12345")
public HtmlToImageClient setJavascriptDelay(int javascriptDelay)
Wait the specified number of milliseconds to finish all JavaScript after the document is loaded. The maximum value is determined by your API license.
Parameter Description Default
javascriptDelay
The number of milliseconds to wait.
Must be a positive integer number or 0.
200
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setElementToConvert(String selectors)
Convert only the specified element from the main document and its children. The element is specified by one or more CSS selectors. If the element is not found, the conversion fails. If multiple elements are found, the first one is used.
Parameter Description Default
selectors
One or more CSS selectors separated by commas.
The string must not be empty.
Returns
  • HtmlToImageClient - The converter object.
Examples:
  • The first element with the id main-content is converted.
    setElementToConvert("#main-content")
  • The first element with the class name main-content is converted.
    setElementToConvert(".main-content")
  • The first element with the tag name table is converted.
    setElementToConvert("table")
  • The first element with the tag name table or with the id main-content is converted.
    setElementToConvert("table, #main-content")
  • The first element <p class="article"> within <div class="user-panel main"> is converted.
    setElementToConvert("div.user-panel.main p.article")
public HtmlToImageClient setElementToConvertMode(String mode)
Specify the DOM handling when only a part of the document is converted.
Parameter Description Default
mode
Allowed values:
  • cut-out
    The element and its children are cut out of the document.
  • remove-siblings
    All element's siblings are removed.
  • hide-siblings
    All element's sibilings are hidden.
cut-out
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setWaitForElement(String selectors)
Wait for the specified element in a source document. The element is specified by one or more CSS selectors. The element is searched for in the main document and all iframes. If the element is not found, the conversion fails.
Parameter Description Default
selectors
One or more CSS selectors separated by commas.
The string must not be empty.
Returns
  • HtmlToImageClient - The converter object.
Examples:
  • Wait until an element with the id main-content is found.
    setWaitForElement("#main-content")
  • Wait until an element with the class name main-content is found.
    setWaitForElement(".main-content")
  • Wait until an element with the tag name table is found.
    setWaitForElement("table")
  • Wait until an element with the tag name table or with the id main-content is found.
    setWaitForElement("table, #main-content")
  • Wait until <p class="article"> is found within <div class="user-panel main">.
    setWaitForElement("div.user-panel.main p.article")

 

Image Output

public HtmlToImageClient setScreenshotWidth(int screenshotWidth)
Set the output image width in pixels.
Parameter Description Default
screenshotWidth
The value must be in a range 96-7680.
1024
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setScreenshotHeight(int screenshotHeight)
Set the output image height in pixels. If it's not specified, actual document height is used.
Parameter Description Default
screenshotHeight
Must be a positive integer number.
Returns
  • HtmlToImageClient - The converter object.

 

Miscellaneous

public HtmlToImageClient setDebugLog(boolean debugLog)
Turn on the debug logging. Details about the conversion are stored in the debug log. The URL of the log can be obtained from the getDebugLogUrl method.
Parameter Description Default
debugLog
Set to true to enable the debug logging.
false
Returns
  • HtmlToImageClient - The converter object.
public String getDebugLogUrl()
Get the URL of the debug log for the last conversion.
Returns
  • String - The link to the debug log.
public int getRemainingCreditCount()
Get the number of conversion credits available in your account.
The returned value can differ from the actual count if you run parallel conversions.
The special value 999999 is returned if the information is not available.
Returns
  • int - The number of credits.
public int getConsumedCreditCount()
Get the number of credits consumed by the last conversion.
Returns
  • int - The number of credits.
public String getJobId()
Get the job id.
Returns
  • String - The unique job identifier.
public int getOutputSize()
Get the size of the output in bytes.
Returns
  • int - The count of bytes.

 

API Client Options

public HtmlToImageClient setUseHttp(boolean useHttp)
Specifies if the client communicates over HTTP or HTTPS with Pdfcrowd API.
Parameter Description Default
useHttp
Set to true to use HTTP.
false
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setUserAgent(String userAgent)
Set a custom user agent HTTP header. It can be usefull if you are behind some proxy or firewall.
Parameter Description Default
userAgent
The user agent string.
pdfcrowd_java_client/4.3.3 (http://pdfcrowd.com)
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setProxy(String host, int port, String userName, String password)
Specifies an HTTP proxy that the API client library will use to connect to the internet.
Parameter Description Default
host
The proxy hostname.
port
The proxy port.
userName
The username.
password
The password.
Returns
  • HtmlToImageClient - The converter object.
public HtmlToImageClient setRetryCount(int retryCount)
Specifies the number of retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0.
Parameter Description Default
retryCount
Number of retries wanted.
1
Returns
  • HtmlToImageClient - The converter object.

 

Error Handling

try {
    // call the API 
}
catch(Pdfcrowd.Error why) {
    // print error
    System.err.println("Pdfcrowd Error: " + why);

    // print just error code
    System.err.println("Pdfcrowd Error Code: " + why.getCode());

    // print just error message
    System.err.println("Pdfcrowd Error Message: " + why.getMessage());

    // or handle the error by your way
}

Troubleshooting

  • Check API Status Codes in case of the error code is returned.
  • You can use setDebugLog and getDebugLogUrl to get detailed info about the conversion, such as conversion errors, time, console output.
  • You can use our JavaScript library to resolve rendering problems, such as missing content or blank pages.
    Just use setCustomJavascript with libPdfcrowd.highlightHtml(borders, backgrounds, labels, noZeroSpace) method call to visualize all HTML elements. See example.
  • Take a look at the FAQ section.