List of Document Parser Special Functions

List of Document Parser Special Functions

{% raw %}

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 API Docs here.

$$barcode:

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

How to use:

  • Add FIELD from RECTANGLE
  • Adjust rectangle to select a page area where barcode is located. If you are not sure where barcode will be located, please adjust the rectangle to cover the whole page
  • Edit Expression value for this field
  • Insert special function $$barcode:QRCode for QR Code barcode. You can extract multiple barcode types by listing them separated by the comma, like this: $$barcode:QRCode,Code128. This will look for both QR Code and Code 128 barcodes in selected area.

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

{% endraw %}

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.