Comparison Profile

Filters and optimizations

Headers and Footers

This filter can be used to exclude headings and footers from the comparison that leads to the reduction of repeating differences. Automatic detection is only possible in non-strict mode. Three options are available.

  • Do not recognize Headers and footers are not recognized
  • Automatically Detect Headers and footers are automatically recognized and treated by PDFC
  • Manually set Headers and footers allow you to precisely adjust pixels if the areas can not be detected automatically.

Comparison Profile

Filters and optimizations

Headers and Footers

The Headers and Footers GUI page describes the current three-state sidebar field. This Programming page documents the technical raw values and their mapping separately from the user interface.

Raw profile values

Name Value and meaning
FILTERS Contains the HEADERFOOTER filter identifier to activate the filter. Values are stored as a comma-separated list.
FIXED_HEADER_SIZE Integer size in pixels. A non-negative value is the manually defined header size. A negative value encodes automatic detection as -(size + 1). -1 therefore represents automatic detection with an exposed size of 0 pixels.
FIXED_FOOTER_SIZE The footer equivalent of the header-size value. Non-negative values are manual pixel sizes; negative values use the same automatic-detection encoding.

The filter implementation treats every value below 0 as automatic detection. The current sidebar derives its mode from the filter identifier and both size values: if HEADERFOOTER is absent, the mode is Don't detect; if both size values are negative, it is Auto detect; once at least one value is non-negative, it is Set manually. The current profile sidebar provides Header Size and Footer Size sliders from 0 to 200 pixels.

Profile XML

The following example enables automatic detection:

<entry key="FILTERS">HEADERFOOTER</entry>
<entry key="FIXED_HEADER_SIZE">-1</entry>
<entry key="FIXED_FOOTER_SIZE">-1</entry>

A manual configuration stores non-negative size values:

<entry key="FILTERS">HEADERFOOTER</entry>
<entry key="FIXED_HEADER_SIZE">36</entry>
<entry key="FIXED_FOOTER_SIZE">42</entry>

Structure and API keys

Key Mapping
pdfc.filter.header_footer_filter Exposes GUI mode off, automatic, or manual and controls the HEADERFOOTER filter identifier in FILTERS.
pdfc.filter.header_footer_filter.fixed_header_size Accesses FIXED_HEADER_SIZE.
pdfc.filter.header_footer_filter.fixed_footer_size Accesses FIXED_FOOTER_SIZE.

The structure and API keys are separate from the profile names. The profile configuration stores FILTERS, FIXED_HEADER_SIZE, and FIXED_FOOTER_SIZE; the structure interface uses keys with the pdfc.filter.header_footer_filter prefix.

Mapping to the current sidebar

  • Don't detect removes HEADERFOOTER from FILTERS and sets both size values to -1.
  • Auto detect adds HEADERFOOTER to FILTERS and stores both size values as negative. Detection analyzes recurring header and footer areas.
  • Set manually adds HEADERFOOTER to FILTERS, displays Header Size and Footer Size, and stores non-negative pixel values.
  • The manual size fields are displayed only for Set manually. When switching to Auto detect, the current sizes are stored with the negative encoding.