Get Coordinates With Keywords

POST /esignglobal/v1/files/keywordPositions

Interface Description

Developers can get the coordinates of the specified content on the file with this interface. The search scope is the entire document.

Request Parameters

Parameter

Type

Required

Description

fileKey

string

true

File fileKey

keywords

array

true

A list of keywords that can be located in the file.

[Note]

  1. You can pass a maximum of 5 keywords at a time.
  2. Special characters, emojis, and any characters unsupported by Adobe are not allowed in the keywords.

Request Example

{
"keywords ": [
"Creator:",
"Print Date:"
],
"fileKey": "$dd863699-e1ba-47ba-b05c-26029e7089f9$793468458"
}

Responses

Parameter Name

Type

Description

keywordPositions

array

Keyword Information

 

keyword

array

Keyword

 

searchResult

boolean

Whether returns the coordinate value with the specified keyword.

 

 

positions

array

Keyword Location Information

 

 

pageNum

int

Page number of the keyword

 

 

coordinates

array

Keyword's XY coordinate values

[Note]

The coordinates are based on the position of the first word of the keyword. The coordinate array is ordered first by descending Y coordinates, followed by ascending X coordinates.

 

 

 

positionX

float

X coordinate

 

 

 

positionY

float

Y coordinate

Response Example

{
    "code": "0",
    "data": [
    {
      "keyword": "制单人:",
      "positions": [
        {
          "coordinates": [
            {
              "positionX": 174,
              "positionY": 361.27
            }
          ],
          "pageNum": 2
        }
      ],
      "searchResult": true
    },
    {
      "keyword": "打印日期:",
      "positions": [
        {
          "coordinates": [
            {
              "positionX": 804,
              "positionY": 361.77
            }
          ],
          "pageNum": 2
        }
      ],
      "searchResult": true
    }
  ],
    "message": "成功"
}

 

Interface Description
Request Parameters
Request Example
Responses
Response Example