Skip to content

Graphical redaction: draw fixed bounding boxes over regions of an image or

Source: 25-graphical-boundingbox.phisql

PhiSQL

-- Graphical redaction: draw fixed bounding boxes over regions of an image or
-- PDF page. Each CONFIGURE GRAPHICAL BOX ( ... ) appends one box; `page` and
-- `color` are optional. Compiles to 25-graphical-boundingbox.json.

POLICY graphical_boxes;

REDACT SSN WITH MASK;

CONFIGURE GRAPHICAL BOX (x = 10, y = 20, w = 100, h = 50, page = 2, color = 'black');
CONFIGURE GRAPHICAL BOX (x = 200, y = 40, w = 80, h = 30);

Compiles to

{
  "identifiers": {
    "ssn": {
      "ssnFilterStrategies": [
        { "strategy": "MASK" }
      ]
    }
  },
  "graphical": {
    "boundingBoxes": [
      {
        "x": 10,
        "y": 20,
        "w": 100,
        "h": 50,
        "page": 2,
        "color": "black"
      },
      {
        "x": 200,
        "y": 40,
        "w": 80,
        "h": 30
      }
    ]
  }
}