Comparison Profile

A comparison profile for i-net PDFC contains parameters and settings for the comparison of documents. Different comparison profiles can lead to very different results. Therefore, it may be necessary to adjust or optimize a profile for a specific comparison scenario.

Profiles supplied with i-net PDFC or an installed extension, and profiles provided centrally by an administrator, remain centrally controlled. Users can duplicate these profiles into their own profiles and customize the copies. The configuration permission is required for server-wide profile administration. The web interface also treats access to the Users and Groups application as administrative access when that application is installed.

Manage Compare Profiles

The Configuration application controls whether provided profiles are active under Comparison → Profiles. Activated profiles are available in the profile selector of the comparison application. The selector groups visible profiles into Provided profiles, Shared profiles and Own profiles and displays each profile's name and description. The statuses Customized and Centrally provided indicate a personal derivative and a centrally managed profile.

Create profile and Actions are located in the header of the profile sidebar. The action menu is context-dependent. It can provide editing, duplication, deletion, publishing, default loading, restoration of deleted provided profiles, import and export. Availability depends on the profile origin, editability, permissions, server restrictions and Drive availability. The comparison interface documents the user-oriented profile handling.

Note: The technical profile properties described below are independent of whether a profile is provided, shared or owned. A profile can be available in the selector while individual management actions remain unavailable.

The following settings are optional and only used for managing comparison profiles. The properties have no effect on the comparison itself.

Property Name Description
PROFIL_NAME A unique name to differentiate profiles.
PROFIL_DESCRIPTION A descriptive text for the profile.

Import/Export of profiles

Each profile can be stored in an external file using Actions → Export → Download. When Drive is available, Actions → Export → Save to Drive is also offered. Export files are portable and can be used with any type of i-net PDFC installation, including the GUI, API and server.

To import a profile, select an editable own profile or duplicate a provided profile. Then use Actions → Import → Upload file to select an XML profile. When Drive is available, From Drive can be used as an alternative. The selected imported profile replaces all settings of the current profile.

Exported profiles can be edited outside the application to set properties that are not exposed by the configuration interface. The possible settings are described in the respective tables.

Profile settings

The behavior and precision of i-net PDFC can be specified using configuration properties. These configuration properties are included in the file config.xml.

After installation, the installation folder contains config.xml with default values. You can change these default values by editing this file. If the file does not exist, i-net PDFC uses the default values.

Note: The graphical user interface uses the file .pdfc in the current user's home directory instead of the config.xml file in the installation directory. You can edit this file in the same way for special fine-tuning, but this is not necessary in most cases.

A profile basically contains the settings for the comparison mode, element comparison types and filters to be used. Each filter or comparison type may have additional options to fine-tune the feature.

Comparison mode

Property Name Description
CONTINUOUS_COMPARE This value defines which comparison engine is used. The available raw values are CONTINUOUS and STRICT. The default value is CONTINUOUS.

In the web interface, CONTINUOUS_COMPARE=CONTINUOUS is displayed as Continuous documents. The raw value STRICT is displayed as Page by Page. The user-oriented labels do not change the technical property values.

Continuous mode

The following property only works in comparison mode CONTINUOUS.

Property Name Description Default Range
CONTINUOUS_DETECT_PAGES Specifies whether continuous comparison can be split instead of comparing all content at once. If set to a value greater than zero, this specifies how many pages may be added or inserted before the comparison fails to match the content. The larger this value, the more precise the comparison can be. A large value increases memory consumption. If this value is zero, all content is compared at once, which provides the optimum result at the cost of maximum memory usage. 5 0 - 2147483647

Strict mode

The following properties only work in comparison mode STRICT.

Property Name Description Default Range
TOLERANCE_PAGE_LEFTCORNER Specifies the maximum number of pixels that the left or top margin of a page can differ, measured at the upper-left corner of all elements, before it is viewed as a difference. 3 0 - 100
TOLERANCE_PAGE_RATIO Specifies the tolerance for the aspect ratio of the PDF page. 0.01 0 - 1
TOLERANCE_PAGE_SIZE Specifies the maximum number of pixels that the width or height of a page can differ before it is viewed as a difference. 2 0 - 100

Logging and Results

Deprecated, these properties will be removed in a future version.

With the following properties it is possible to configure the output of i-net PDFC and the logging. This profile setting are deprecated and will be removed soon. Use the Settings or the CommandLine arguments instead.

Property Name Description
CREATE_DIFFIMAGES Specifies if a PNG image with the marked difference will be created for each pair
of pages that contains differences. Possible values are: false, first, second
and true - this creates the difference image for none, the first, the second or
both files.
The default value is: false.
CREATE_ORIGIMAGES Specifies if a PNG image with the original content will be created for
each compared page.
The default value is: false.
CREATE_XORIMAGES Creates an (negated) XOR image for any pair of pages with differences.
The image will be stored as a PNG in the differences directory of the
current comparison. If CREATE_DIFFIMAGES is enabled as well,
the XOR image will be drawn onto the image created by
CREATE_DIFFIMAGES between the two actual page images.
The default value is: false.
IMAGE_SCALE_FACTOR Defines a scale factor for the generated images (original and
difference images). The default is 1, i.e., no scaling.
The default value is: 1.
LOG_FILE Specifies the file where logged information is to be stored.
If a file is specified, the logging is written to the file, otherwise the logging is
written to the console.
Default is empty, logging to the console.
LOG_LEVEL Specifies the Logging Level. Available values:
''OFF'' // switches the output completely off.
''ERROR'' // logs error messages.
''WARN'' // contains all the messages from ERROR-Level and 
            additionally informs about the irregularities 
            during the execution.
''INFO'' // (Default) contains all the messages from 
            WARN-Level and additionally describes settings 
            and environment attributes.
''ALL'' // is used to display the maximal information during 
           the PDFC execution including any debug info.
MAX_ERRORS_PER_FILE Sets the maximum number of differences for the console or log output.
All further differences will be counted but not shown in detail.
The default value is: 100. [ Value "-1" for unlimited]
EXPORT_PDF_ALWAYS Specifies whether the PDF export function should create a file for
any comparison(value true) or only in case of differences(value false).
The default value is: false

Filters and optimizations

Filters are an optional feature for the continuous mode. They help to remove redundant elements from the comparison and to overcome the issue that PDFs may not contain any information about the original text layout. Please note these filters may not be exactly correct in every case. Finding the original layout of a document depends heavily on the content of the documents. The chance of correctly detecting a header rises with the number of pages available. It is therefore recommended to use the desktop or web application of i-net PDFC when activating filters, since they allow you to review the result of each filter.

Filters can be activated by adding them to the FILTERS property:

Property Name Description
FILTERS Specifies a comma-separated list of filters that will be executed before the actual comparison.

If all available filter plugins are installed and activated in the server configuration, the following filter keys are available:

Compared Types

The continuous compare mode distinguishes between four types of content: text words, lines and shapes, images and annotations. Each of these types can be excluded from the comparison.

Compared types can be included or excluded using the COMPARE_TYPES property:

Property Name Description
COMPARE_TYPES Specifies a comma-separated list of types that will be included in the comparison. The default is TEXT, LINE, IMAGE, ANNOTATION.

Text comparison

Property

This includes all text elements such as words, numbers, punctuation and list items. Text comparison can be modified using the following properties:

Property Name Description
DOCUMENT_LANGUAGE This value defines the language for all text recognition plugins. If the configured language does not match the actual language of the document, recognition errors increase significantly. If the required language is not available, see the OCR help page for information about installing further languages. The default value is auto-detect, in which case i-net PDFC tries to detect the language from native text elements in the document, if any. If the language cannot be detected, the client language or English is used.
TEXT_ALIGN_RATIO The text tolerance value sets the allowed vertical deviation for text line identification. It is relative to the text height of the respective line. This value can compensate for rounding errors from different PDF generators. If documents have a very accurate layout, a lower value leads to a more precise comparison. The default value is 0.15.
COMPARE_TEXT_STYLES A comma-separated list defining which text properties of matched words to compare. Available values are SIZE, COLOR, FONT, STYLES and ROTATION. The default value compares all properties.
TOLERANCE_TEXT_SIZE Defines the tolerated difference in text size as a ratio. It is relevant when COMPARE_TEXT_STYLES includes the size property. The default value is 0.05.
TOLERANCE_COLOR Defines the maximum color difference per RGB or HSB channel for all paints. The value is the absolute difference for HSB and absolute * 255 for RGB. This value is also used by line comparison. The default value is 0.01, which is 1%.
COMPARE_TEXT_CASE_SENSITIVE Toggles case sensitivity of the text comparison. If set to false, all text elements are compared as lowercase. This makes the comparison slightly slower and uses more memory. Lowercase conversion uses the default localization of the runtime. The default value is true.
TOLERANCE_UNDERLINE_LENGTH Specifies the maximum difference in percent by which underline lengths may differ before they are viewed as a difference. The default value is 0.1. The range is 0.0 - 10.0. This value is only used for a STRICT comparison mode.

Line and shapes comparison

Deviation tolerance for lines

This value includes all graphical elements except images. Line and shape comparison can be modified using the following properties:

Property Name Description Default Range
COMPARE_LINE_STYLES If set to true, the styles of all matched lines and shapes are checked as well. This compares the color, stroke and thickness of all lines. true
TOLERANCE_LINE_POSITION Specifies the maximum number of pixels by which the position of a line or curve can differ per axis before it is viewed as a difference. 3 0 - 100
TOLERANCE_LINE_SIZE Specifies the maximum number of pixels by which the length of a line can differ in total before it is viewed as a difference. 2 0 - 100
TOLERANCE_LINE_THICKNESS Specifies the maximum difference in stroke thickness of two lines or curves, measured in pt, before it is viewed as a difference. 1 0 - 100
TOLERANCE_COLOR Defines the maximum color difference per RGB or HSB channel for all paints. The value is the absolute difference for HSB and absolute * 255 for RGB. This value is also used by text comparison. 0.01 0.0 - 1.0
TOLERANCE_BOX_ROUND_EDGES Specifies the maximum number of pixels by which a control point of a quadratic Bezier curve may differ in total before it is viewed as a difference. 3 0 - 10

Image comparison

Deviation tolerance for images

This value includes all images. Comparing images may have a notable impact on performance. Image comparison can be modified using the following properties:

Property Name Description Default Range
TOLERANCE_IMAGE_DISTANCE Specifies the maximum number of pixels by which the position of an image can differ before it is viewed as a difference. 3 0 - 10
TOLERANCE_IMAGE_PIXEL_VALUE Specifies the maximal allowed discrepancy of pixel values, as a Double, before it is viewed as a difference. 0.05 0.0 - 1.0
TOLERANCE_IMAGE_SIZE Specifies the maximum difference in percent by which the area spanned by an image may differ before it is viewed as a difference. 0.1 0.0 - 1.0
USE_PIXEL_MEDIUM_VALUE Specifies whether image comparison compares medium values instead of single-pixel values. true

Annotation Comparison

Property Name Description
COMPARE_ANNOTATIONS_DETAILED Specifies whether differences per annotation are summarized, using false, or fully detailed like any other difference in the document, using true. The default value is false.