PDF Forms Tutorial

The Applitools PDF Tool allows you to easily run visual UI tests on a collection of image files, by placing them inside a directory (also works with nested directory structure). It runs as a standalone jar file and can be invoked as a process by any programming language.

Step 1: Download ImageTester

ImageTester is a CLI tool to perform visual tests on images or PDF files. Download it from here: Download

If you don't have your Applitools account yet, please sign up first and get your Applitools api-key that will be used next to execute the tests.

The tool can be invoked on a single file or a complex folder structure with mixed content.

Step 2: Execution

The tool build in java and requires minimal set of parameters the minimal command will look as follow:

java -jar ImageTester.jar -k [api-key] -f [path-to-pdf-file]
  • Required parameters:
    • -k [api-key] - Applitools api key
  • Optional paramaeters:
    • -f [path] - A path to target folder or file
    • -a [app-name] - Set the application name under test; default = ImageTester
    • -p [http://proxy{;user;pass}] - Set proxy and optional username + password
    • -s [server] - Set Applitools server url
    • -ml [match-level] - Set the comparison level, one from Strict/Content/Layout; Default = Strict
    • -br [branch] - Set the branch
    • -pb [parent-branch] - Set the parent branch
    • -bn [baseline] - Set custom baseline name
    • -vs [WidthxHeight] - Set the viewport size identifier
    • -lf [log-file] - Set log fine name to enable logging
    • -os [osname] - Set custom os
    • -ap [browser name] - Set browser or equivalent hosting application name
    • -as - Set automatic save on failures ######For Documents (PDFs) only
    • -di [dpi] - Set the quality of the conversion on PDF files
    • -sp [pages] - Comma separated page numbers to include in PDF testing (ie: 1,2,5,7); Default all included
    • -pp [password] - The password if the PDF files protected
    • -pn - Preserve original test names when specifying pages

Enterprise features in combination with Eyes Utilities

By placing the Eyes-Utilities jar into the same folder as the ImageTester, new enterprise api features made possible by providing an enterprise read-key.

java -jar ImageTester.jar -k [api-key] -vk [view-key] [options]
  • Required parameters:
    • -k [api-key] - Applitools api key
    • -vk [view-key] - Applitools enterprise view-key
  • Selective flags - Required one or more
    • -gd - Get diff images of the failed steps
    • -gi - Get images of the failed steps
    • -gd - Get animated gifs of the failed steps

Supporting regions

To validate only a specific regions of a particular image the folder must contain .regions file with the same name as the image. ie. If my image file is 'step1.png' then the regions file should be 'step1.regions'. Internally the format should be 4 columns csv in the following order: left,top,width,height

Here is an example of what can be step1.regions:

0,0,100,200
500,100,240,123

In order to include a capture of the entire image too, add an empty line as part of the regions list.

Step 3: Analyze your test results

Congratulations! You've successfully run your first visual UI test with Applitools Eyes! A detailed report is ready for your inspection at the Applitools Eyes test manager. Watch this 5 minute video to get acquainted with the test manager and to learn the basics of baseline maintenance.

Login to Applitools and analyze the results.

Learn more

Applitools Eyes is a powerful platform for automated visual UI testing that supports full page screenshots, page layout matching, cross-device and browser testing, test batching, baseline branching and merging, automated baseline maintenance, collaboration features, and much more. Applitools has over 40 SDKs supporting a broad range of testing environments.

Reference documentation

To learn more, check out the Applitools Eyes documentation and tutorials for other testing environments.

Request a demo

If you want to see a demo of all our other features, you do request a demo

Knowledge base and Support

You can search our Knowldege base for more information. You can also file a contact our support team and file a Ticket.


Terms & Conditions Privacy Policy GDPRĀ© 2018 Applitools. All rights reserved.

Last Updated: 12/12/2018, 2:16:54 PM