List of Document Parser Special Functions#

Special functions are designed for AI-powered search. For example, finding a company name, min date or max number in the document.

How to use $$function inside Expression for a field:#

  1. Set Expression to macros. For example: $$funcFindCompany

  2. This will search for the company name in the document and will return the value

Macro vs special function:

  • Macro: {{macroName}}

  • Function: $$functionName

Available Special Functions#

  • $$funcFindCompany

  • $$funcFindCompanyNext

  • $$funcFindMaxNumber

  • $$funcFindMaxDate

  • $$funcFindMinDate

  • $$barcode:<barcode_types>

$$funcFindCompany

This searches for the company name. The Document Parser contains a large embedded list of existing companies. If company name from this list is not found, the function tries to detect company name by typical postfix like “Ltd.”, “Inc.”, “Corp.”, etc.

funcFindCompany

$$funcFindCompanyNext#

This searches for another company name after the position of the first found company name.

funcFindCompanyNext

$$funcFindMaxNumber#

This finds maximal number in the text that matches the {{Money}} macro (decimal number with optional currency symbol).

funcFindMaxNumber

$$funcFindMaxDate#

This finds maximal date in the text that matches the {{SmartDate}} macro (dates in the most common national formats). This is very useful when looking up the due date of a document.

funcFindMaxDate

$$funcFindMinDate#

This finds minimal date in the text. This is very useful when looking up the issued date of a document.

funcFindMinDate

To learn more about the PDF.co Document API, check out our Document Parser documentation.

$$barcode:<barcode_types>#

This function decodes barcodes from rectangle fields. The list of supported barcode types is available below.

How to use:

  1. Add FIELD from RECTANGLE

  2. Adjust the rectangle to select a page area where the barcode is located. If unsure, set the rectangle to cover the entire page.

  3. Edit the Expression value for this field.

  4. Use the template $$barcode:[parameter],[barcode_type1],[BarcodeType2]...
    • Parameters (optional, case-insensitive):

      • RenderingResolution=300 Sets DPI for barcode rendering. Example:

      • $$barcode:RenderingResolution=300,DataMatrix

    • Barcode Types: Comma-separated list of supported formats. Examples:

      • Basic: $$barcode:QRCode

      • Multiple types: $$barcode:QRCode,Code128

      • With parameter: $$barcode:renderingresolution=200,DataMatrix,Code39

Notes:

  • Parameters must be specified before barcode types in the expression.

  • Parameters are case-insensitive.

  • Invalid parameters will be ignored.

  • Resolution values are numeric (typical range: 150-600 DPI).

Supported Barcode Types#

AustralianPostCode
Aztec
CircularI2of5
Codabar
CodablockF
Code128
Code16K
Code39
Code39Extended
Code39Mod43
Code39Mod43Extended
Code93
DataMatrix
EAN13
EAN2
EAN5
EAN8
GS1
GS1DataBarExpanded
GS1DataBarExpandedStacked
GS1DataBarLimited
GS1DataBarOmnidirectional
GS1DataBarStacked
GTIN12
GTIN13
GTIN14
GTIN8
IntelligentMail
Interleaved2of5
ITF14
MaxiCode
MICR
MicroPDF
MSI
PatchCode
PDF417
Pharmacode
PostNet
PZN
QRCode
RoyalMail
RoyalMailKIX
Trioptic
UPCA
UPCE
UPU

Examples#

$$barcode:QRCode,Code128
$$barcode:QRCode
$$barcode:Datamatrix