9 Extraction Rules

9.1 Overview

Extraction rules enable automatic extraction of information from PDF documents. The extracted data can be used as placeholders in file names, email texts, target folders, and many other contexts.

Opening: Click Add or Edit in the Profile Settings under Data Extraction.

Typical Applications

Application Example
File names <InvoiceDate>_<InvoiceNumber>.pdf
Target folders D:\Archive\<Year>\<Month>\
Email subject Invoice <InvoiceNumber> dated <InvoiceDate>
CSV export All extracted values in a table

Structure of a Rule

Each rule consists of several components:

Component Description
General Name, source, data type
Determination How the value is found
Clean-up Preprocessing of the raw value
Verification Checking the found value
Format Post-formatting of the value

Temp. OCR Support for Scanned Example Files

At the bottom left of the rule editor you will find the Temp. OCR support checkbox. It is preset with the setting of the profile category of the same name (section 8.4) and applies to all rules: If enabled, the preview temporarily recognizes the text of example files without a text layer (e.g. scans) via text recognition - you can thus configure rules directly on the scan and see exactly the values that the processing will determine as well.

  • On first access to such a file, a progress window shows the state of the text recognition (depending on the size, this can take several minutes). Cancel disables the temp. OCR support for the current session; the recognition continues in the background, so re-enabling it later takes effect without waiting.
  • If you enable the checkbox while the “Temp. OCR Support” category is still disabled in the profile, the program offers to activate it - it is required so that the processing also recognizes scanned files.
  • The recognition is performed on a temporary copy using the settings of the category (including the page limit); the example file itself remains unchanged.

9.2 General

The General tab contains basic settings of the rule.

9.2.1 Name

The name of the rule. This name is used for placeholders.

Format: <RuleId:N(RuleName)> The rule ID N is automatically determined and used.

Tip: Use meaningful names without special characters, for example CustomerNumber or InvoiceDate.

Note: If you create multiple rules with the same name, it is sufficient if one of these rules achieves a valid result. The program automatically uses the first successful result. This is useful for fallback scenarios, e.g., when one rule fails for certain document types.

9.2.2 Comment

Optional field for notes about the rule.

9.2.3 Data Source

Determines where the data is extracted from:

Source Description
Document Text Text of the PDF document
Barcode Content of a barcode in the PDF
PDF Property PDF metadata (title, author, etc.)
File Property File properties (name without file extension, path, date)
Custom Text Fixed or calculated value, for example n/a
Placeholder Value Reference to another rule located above the current rule
Form Field Value of a PDF form field
Sequential Number Automatically incrementing number (e.g., for document IDs)

9.2.4 Data Type

The required type of the extracted value:

Data Type Description
Text Any text
Date Date values with automatic detection
Number Numeric values
Query Conditional value selection
Query (with List) Value from a static or file-based list

9.2.5 Determined Result May Be Empty

Normally, a rule counts as failed if it does not deliver a value - the task then aborts with an error unless a fallback rule with the same name applies (see section 9.15.3). With this option, the rule counts as successful even without a result: the placeholder simply stays empty in this case.

Typical use case: a value only appears in some documents, for example a calendar year in the subject line. If it is present, it should go into the file name; if it is missing, the file should still be processed. The preview shows such a result as “empty (allowed)”.

The option applies to all rules with the same name together: only if none of them delivers a value is the empty result used.

The option only applies to “nothing found”. Access and configuration errors, such as an unreachable query list, an unreadable file, or an orphaned placeholder, remain errors. If another rule refers to such an empty group via “Placeholder value”, it also receives an empty value. In the extraction result filter, an empty group counts as successfully determined with an empty value; the criterion “extraction must fail” then no longer applies.


9.3 Data Source Document Text or Barcode - Determination: Position

With position-based determination, a resizable selection rectangle marks the desired area on the page.

9.3.1 Determine Page

Option Description
Specify page number Selection rectangle is always positioned on the specified page number
Find page with keyword Selection rectangle is always positioned on the page with the specified keyword

9.3.2 Mark in PDF Viewer

Mark the desired area directly in the page preview: 1. Click Change position and adjust the position and size of the selection rectangle to define the desired area 2. Click Fix position


9.4 Data Source Document Text or Barcode - Determination: Keyword

With keyword determination, a value is extracted relative to a search term (keyword).

9.3.1 Determine Page

Option Description
No determination necessary The page is defined by the keyword specified in Define Data Area
Specify page number The page is defined by a specified page number
Find page with keyword The page is defined by the keyword specified here

9.4.1 Define Data Area

9.4.1.1 Keyword

The text searched for in the document.

Example: Invoice number: to find the number to the right of it.

9.4.1.2 Search Options

Option Description
Case sensitive Respects capitalization
Regular expression Interpret keyword as regex
On multiple occurrences A specific occurrence, should normally be the first occurrence

9.4.1.3 Data Position (Position Relative to Keyword)

Position Description
Right Text to the right of the keyword
Left Text to the left of the keyword
Above Text above
Below Text below
Found location area The searched keyword (optimal for adjusting the data area by extending it to define the desired area)

9.4.2 Extend Data Area

Allows relocating and/or extending the area found via the keyword from which data is extracted:

Setting Description
To the left Relocates the left edge of the data area by a positive or negative value
To the right Relocates the right edge of the data area by a positive or negative value
Upward Relocates the upper edge of the data area by a positive or negative value
Downward Relocates the lower edge of the data area by a positive or negative value

9.4.3 Adjust Data Area Extension

If a keyword was referenced in the previous data area extension, you can fine-tune here

9.4.4 Visualization in PDF Viewer

The PDF viewer displays: - Red: The found keyword - Green: The data area - Blue: The extracted value


9.5 Data Source Document Text - Determination: Text of Page(s)

With this determination, the entire text of one or more pages is used as a basis.

9.5.1 Data Determination (Page Text)

9.5.1.1 Determine Page

Option Description
No determination necessary Uses the text of all pages
Specify page number Uses the text of the page with the specified page number
Find page with keyword Uses the text of the page with the specified keyword

9.5.1.2 Combination with Clean-up

Data determination using page text often yields a lot of text. Use clean-up to extract the relevant part.


9.6 Data Types

9.6.1 Text

For extraction, verification, and formatting of text

For most cases, the data type Text is the right choice.

9.6.2 Date

For extraction and verification of a date

With the data type Date, all dates in the text are automatically evaluated. If you don’t specify a keyword, the first found date is used. When using this data type, all date components are separately available when using the placeholder for path or file name. For example, you can use only the four-digit year and the month name.

Four search options are available for automatic date recognition:

Option Description
Search for a date in the country-specific format Recognizes dates in the format of the program language (e.g. “12/15/2024” or “December 15, 2024”)
Search for a date in any format Recognizes the official date formats of all countries
Search for a date without a day in the format “MMMM yyyy” Recognizes month name plus year (e.g. “April 2026”). The found date is given the 1st as the day
Search for a date in the following formats Recognizes dates based on a self-defined date format list (e.g. also “MM/yyyy” or other formats without a day)

The check is performed in this order: first the date format list, then the country-specific format, then all formats, and finally the search without a day. The capitalization of the month name does not matter.

Times in user-defined formats: The formats of the date format list may also contain time components - HH (hour 00-23), hh (hour 01-12), mm (minute), ss (second), and tt (am/pm). This allows times to be recognized and reformatted via the output format, e.g. converting a 12-hour value to the 24-hour representation: the search format hh:mm:ss tt finds “02:35:47 pm”, and with the output format HH:mm:ss this becomes “14:35:47”. Combined values such as dd.MM.yyyy HH:mm are possible as well. Note: For a pure time without a date, the value internally receives the placeholder date 01/01/2000 - a “date is between” verification is not meaningful in that case. The legend of the date formats (page “Formatting” and date format lists) and the menu “Insert date component” list the time components as well.

9.6.2 Number

For extraction and verification of a number

The optional automatic number detection (“Search for a number in the text”) extracts a specific number from the determined text. This is useful when the data area contains additional text besides the desired number - or when the entire page text serves as the data source, e.g. with scanned documents.

Three search modes are available:

Option Description
in the country-specific number format Recognizes numbers with the group and decimal separators of the program language (e.g. “1,234.56” for English)
in any format Recognizes numbers with dot, comma, apostrophe, or space as separators (e.g. “1.234,56” or “1’234.55”)
as an integer (digits only) Recognizes contiguous digit sequences, optionally with a fixed number of digits - e.g. eight-digit order or document numbers. Leading zeros are preserved

With “Use occurrence no.” you determine which occurrence is used - counted from the beginning or from the end of the text. For example, “1 from the end” returns the last number of the area, such as the total amount of an invoice.

The search refers to the determined text or data area; it can therefore be narrowed down beforehand using a keyword and data position. Numbers found in the country-specific or any format are converted to the number format of the program language and can be further adjusted on the “Formatting” page. Without an active search, the determined text is used unchanged - existing rules therefore behave as before.

9.6.1 Simple Query

With queries, a value is determined based on conditions.

Defines conditions and associated return values:

Document text contains: "X<OR>Y<OR>Z", then use as result "Delivery Note", else ""

9.6.2 Query (with List)

You can use the data type “Query (with List)” to search for the occurrence of a term and use the associated value as the result, e.g., an email address or a folder name.

List Format: Search term and result value are separated by semicolon.

Example 1: Assign email addresses based on customer numbers:

Customer number : 19006;x@y.de
Customer number : 1900;a@b.de
Customer number : 18765;c@d.de

If the PDF contains “Customer number : 19006”, “x@y.de” is used as the result.

Example 2: Search IBAN, use company name as result:

DE02120300000000202051<OR>DE02 1203 0000 0000 2020 51;Mustermann GmbH
DE02500105170137075030;Musterfrau GmbH

Here the IBAN (with or without spaces) is searched and the associated company name is returned.

Example 3: Search pattern (regular expression) as search term - assign street names with spelling variants to an ID:

<BeginOfRegex>(?i)Main\s+Str(eet|\.)\s+12\b<EndOfRegex>;4711
<BeginOfRegex>(?i)Lake\s+Str(eet|\.)\s+5\b<EndOfRegex>;4712

The search term is enclosed in <BeginOfRegex> and <EndOfRegex> and then evaluated as a regular expression. The first pattern matches “Main Street 12” as well as “Main Str. 12”, even with multiple spaces before the house number. Please note:

  • Search patterns are case-sensitive unless prefixed with (?i)
  • The option “search whole words” is not applied to search patterns - use \b in the pattern instead
  • Since search patterns may contain commas, a semicolon is recommended as the column separator

Ignoring characters at the beginning or end of the search term: If the list is generated by another program, its search terms are often “longer” than the value in the document - for example due to an appended check digit, leading zeros, or a prefix. With the option “When comparing, ignore up to [x] characters at the beginning and up to [y] characters at the end of the search term”, a list entry also counts as a match if it occurs in the value only after removing up to x leading or y trailing characters. The list itself remains unchanged.

Example 4: The automatically generated shipping list contains parcel numbers with a check digit (12 digits), while the 11-digit parcel number is extracted from the file name:

831180869281;LI2601904
831180869298;LI2601904

With “ignore up to 1 character at the end”, the search value “83118086928” matches the entry “831180869281” and returns “LI2601904”. Likewise, with “ignore up to 3 characters at the beginning”, the list entry “0004711” matches the value “4711”. The default value 0 corresponds to an exact comparison.

If the search term contains operators, the option applies to the first search term - i.e. the part before the first <OR> or <AND>; the remaining parts and search patterns are left unchanged (there, e.g. \d? achieves the same). This keeps combinations such as “831180869281<AND>Invoice” usable: the number at the beginning is tolerated, the context term must occur exactly. If several alternative values are to be tolerated, use a separate list line for each value.


9.7 Data Source: Form Field

Extracts values from PDF form fields.

9.7.1 Field Selection

Shows all form fields present in the PDF:

Field Type Description
TextBox Text input field
CheckBox Selection field (Yes/No)
RadioButton Option button
ComboBox Dropdown list
ListBox Selection list

9.7.2 Form Field (Field Name)

Select the form field by its name. The name is defined in the PDF form settings.


9.8 Data Source: Sequential Number

Generates an automatically incrementing number saved per profile and rule. Unlike other data sources, no data is extracted from the PDF — instead, a new value is generated.

Typical applications: Document IDs, barcode content, invoice numbers, reference numbers.

9.8.1 Settings

Setting Description
Start Value The first number (e.g., 1 or 1000)
Increment Increase per document (e.g., 1, 10, 100)
Format Output format for leading zeros (e.g., 000000 → 000001)
Auto-reset after days Counter is deleted after X days (0 = never)

9.8.2 Reset Value

To reset the current counter to the start value, enable the Reset current value to start value checkbox and save the profile.

9.8.3 Example

Document ID with QR code:

  1. Create extraction rule “DocNr” with data source Sequential Number
    • Start value: 1, Format: 000000
  2. Barcode task with content: DOC-<RuleId:1(DocNr)>
  3. Result: DOC-000001, DOC-000002, DOC-000003, …

Note: The sequential number is also available in the Replace Content task as a standalone replacement source. There, start value, format, and increment are configurable directly in the replacement settings.


9.9 Clean-up

Clean-up enables preprocessing of the extracted raw value.

9.9.1 Available Clean-up Tasks

Replace Operations

Task Description
Replace text Replaces one text with another
Replace text before marker Replaces everything before a marker
Replace text after marker Replaces everything after a marker
Replace regex result Replaces regex matches
Replace line breaks Replaces line breaks with text
Replace with Excel file Replaces based on Excel mapping

Insert Operations

Task Description
Insert before marker Inserts text before a marker
Insert after marker Inserts text after a marker
Insert at position Inserts text at a specific position

Remove Operations

Task Description
Remove text Removes a specific text
Remove text before marker Removes everything before a marker
Remove first/last characters Removes X characters at the beginning/end
Remove regex result Removes regex matches
Remove blank lines Removes all blank lines
Remove lines with regex Removes lines matching a pattern

Line Operations

Task Description
Extract line X Extracts only a specific line
Move line X Moves a line to another position
Move lines with text Moves lines containing specific text

9.9.2 Clean-up Order

Multiple clean-up tasks are executed in the defined order. Use the arrow buttons to adjust the order.


9.10 Verification: Text

Text verifications check the extracted value for certain conditions.

9.10.1 Available Checks

Check Description
Text equals Exact match
Text does not equal No match
Text contains Contains the search term
Text does not contain Does not contain the search term
Text starts with Starts with the search term
Text ends with Ends with the search term
Text matches regex Matches the regular expression
Text does not match regex Does not match the expression
Extracted text is empty No value extracted
Number of characters Checks text length
Number of lines Checks line count

9.10.2 Character Verification

Checks individual characters at specific positions:

Check Description
Is digit Character is 0-9
Is letter Character is A-Z or a-z
Is uppercase Character is A-Z
Is lowercase Character is a-z
Is alphanumeric Character is letter or digit
Matches regex Character matches a pattern

9.11 Verification: Date

Date verifications check whether the extracted value is a valid date.

9.11.1 Available Checks

Check Description
Date is valid Value is a recognizable date
Date is between Date is within the specified period

9.11.2 Date Formats

The system automatically recognizes various date formats: - 01.12.2024 (German) - 12/01/2024 (American) - 2024-12-01 (ISO) - December 1, 2024 (with month name) - December 2024 (month name and year, provided the search option “date without a day” is activated)


9.12 Verification: Number

Number verifications check numeric values.

9.12.1 Available Checks

Check Description
Number is valid Value is a recognizable number
Number is between Value is within range

9.12.2 Number Formats

Recognized formats: - 1234 (integer) - 1.234,56 (German) - 1,234.56 (English) - -123.45 (negative)


9.13 Verification: Query

Query verifications check values based on conditions.

9.13.1 Available Checks

Check Description
Query returns result The query returns a value

9.14 Formatting

Formatting enables post-processing of the verified value. The main difference from clean-up is that here the search word must be present for replacements.

Leading or trailing spaces: If you deliberately insert a space at the beginning or end in the formatting (for example “Insert at position” with the text ” “), it is preserved when the placeholder is inserted. This creates a conditional addition: if the rule”CalendarYear” delivers the value ” 2025”, the scheme Contribution<RuleId:3(CalendarYear)> results in the name “Contribution 2025”. If it delivers nothing (option “Determined result may be empty”, section 9.2.5), the name stays “Contribution” without a superfluous space. Spaces that do not originate from such an insertion are still removed at the beginning and end of the value.

9.15 Using Placeholders

Extracted values can be used as placeholders in many contexts.

9.15.1 Placeholder Syntax

Syntax Description
<RuleName> Simple placeholder
<RuleId:1(RuleName)> Complete syntax with ID
<RuleName{DatePart}> Extract date part

9.15.2 Date Parts

DatePart Description Example
Year4 Four-digit year 2024
Year2 Two-digit year 24
Month Month (two digits) 12
MonthName Month name December
MonthNameAbbreviated Abbreviated month name Dec
Day Day (two digits) 15
Hour24 Hour (00-23) 14
Hour12 Hour (01-12) 02
Minute Minute (00-59) 35
Second Second (00-59) 47
AmPm AM/PM designator PM

Example: <InvoiceDate{Year4}>-<InvoiceDate{Month}> yields “2024-12”

9.15.3 Fallback Rules

If multiple rules have the same name, the first successful rule is used. This enables fallback values:

  1. Rule “Date” - Attempts extraction from document text
  2. Rule “Date” - If failed: Uses file date

The fallback rule can also use the data source “Custom Text” with a fixed value, for example “-”. If simply nothing should be inserted when the value is missing, the option “Determined result may be empty” (section 9.2.5) is the easier way - it works without a second rule.