write_redaction.json

Le fichier JSON de l'exemple « Une déposition communiquée en partie ». Trois marques mesurées sur les mots mêmes qu'elles couvrent : l'une montre le motif au milieu de son emplacement, l'autre le répète sur toute la longueur d'un emplacement plus large, la troisième couvre sans un mot. Une marque dit ce qui doit partir ; elle ne l'enlève pas.

JSON 364 lignes

Ce fichier est une requête : une application l'envoie par le réseau au serveur, qui crée le PDF et le renvoie. Il donne la même page que les versions Rust et Python de cet exemple. Une requête nomme chaque fichier qu'elle emploie, jamais son contenu ; l'appel porte la requête et les fichiers ensemble. Une police que le serveur détient déjà, comme DejaVuSans, se nomme sans rien y joindre. Envoyez la requête à l'adresse que donne la page de l'API.

À quoi sert cet exemple

Une déposition part entière à la partie adverse, et ce qui identifie le témoin ne part pas avec elle : le nom, l'adresse, le compte. Les trois boîtes de cette page sont mesurées sur les lignes mêmes qu'elles couvrent — la largeur des mots, la hauteur qu'ils atteignent au-dessus et au-dessous de la ligne — au lieu d'être posées sur une zone que quelqu'un a jugée à peu près bonne. Chacune dit aussi ce qui doit se tenir dans l'emplacement qu'elle laisse : la première montre le motif en son milieu, la deuxième le répète sur un emplacement trop large pour qu'un seul mot s'y lise, et la troisième couvre sans un mot.

Ce que montre cet exemple

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
{
  "items": [
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 780.0,
        "urx": 539.0,
        "ury": 799.2
      },
      "content": [
        "Witness statement, released in part"
      ],
      "font": "DejaVuSans",
      "font_size": 16.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 736.0,
        "urx": 539.0,
        "ury": 746.8
      },
      "content": [
        "As it is released"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0,
      "color": [
        0.35,
        0.35,
        0.35
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 548.0,
        "urx": 539.0,
        "ury": 558.8
      },
      "content": [
        "As a reading software shows it once it has applied the marks"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0,
      "color": [
        0.35,
        0.35,
        0.35
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 700.0,
        "urx": 539.0,
        "ury": 713.2
      },
      "content": [
        "Name"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 216.0,
        "lly": 700.0,
        "urx": 539.0,
        "ury": 713.2
      },
      "content": [
        "Claire Vasseur"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 676.0,
        "urx": 539.0,
        "ury": 689.2
      },
      "content": [
        "Address"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 216.0,
        "lly": 676.0,
        "urx": 539.0,
        "ury": 689.2
      },
      "content": [
        "14 rue des Lilas, 59000 Lille"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 652.0,
        "urx": 539.0,
        "ury": 665.2
      },
      "content": [
        "Account"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 216.0,
        "lly": 652.0,
        "urx": 539.0,
        "ury": 665.2
      },
      "content": [
        "FR76 3000 1007 9412 3456 7890 185"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 506.0,
        "urx": 539.0,
        "ury": 618.0
      },
      "content": [
        "The statement itself is released whole. What identifies the witness is struck out above: the name shows the reason in the middle of its gap, the address repeats it along the length of a longer one, and the account is covered without a word."
      ],
      "font": "DejaVuSans",
      "font_size": 10.0,
      "leading": 14.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 512.0,
        "urx": 539.0,
        "ury": 525.2
      },
      "content": [
        "Name"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 488.0,
        "urx": 539.0,
        "ury": 501.2
      },
      "content": [
        "Address"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 464.0,
        "urx": 539.0,
        "ury": 477.2
      },
      "content": [
        "Account"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "rect",
      "rect": {
        "llx": 216.0,
        "lly": 509.0,
        "urx": 295.3095703125,
        "ury": 526.0
      },
      "fill": [
        0.0,
        0.0,
        0.0
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 230.942138671875,
        "lly": 512.0,
        "urx": 539.0,
        "ury": 522.8
      },
      "content": [
        "REDACTED"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0,
      "color": [
        1.0,
        1.0,
        1.0
      ]
    },
    {
      "type": "rect",
      "rect": {
        "llx": 216.0,
        "lly": 485.0,
        "urx": 370.48876953125,
        "ury": 502.0
      },
      "fill": [
        0.0,
        0.0,
        0.0
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 216.0,
        "lly": 488.0,
        "urx": 539.0,
        "ury": 498.8
      },
      "content": [
        "REDACTED"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0,
      "color": [
        1.0,
        1.0,
        1.0
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 274.0078125,
        "lly": 488.0,
        "urx": 539.0,
        "ury": 498.8
      },
      "content": [
        "REDACTED"
      ],
      "font": "DejaVuSans",
      "font_size": 9.0,
      "color": [
        1.0,
        1.0,
        1.0
      ]
    },
    {
      "type": "rect",
      "rect": {
        "llx": 216.0,
        "lly": 461.0,
        "urx": 425.9130859375,
        "ury": 478.0
      },
      "fill": [
        0.0,
        0.0,
        0.0
      ]
    },
    {
      "type": "text",
      "rect": {
        "llx": 56.0,
        "lly": 332.8,
        "urx": 539.0,
        "ury": 428.0
      },
      "content": [
        "A mark says what must go. It does not take it out. Until a reading software applies these marks and writes the document out again, the words are still under the boxes and a search finds them — which is why the lower half is drawn here in this example's own ink, and is not what the file states."
      ],
      "font": "DejaVuSans",
      "font_size": 8.5,
      "leading": 11.899999999999999,
      "color": [
        0.35,
        0.35,
        0.35
      ]
    }
  ],
  "page_review_marks": [
    {
      "page": 1,
      "shapes": [
        {
          "type": "redaction",
          "llx": 216.0,
          "lly": 697.0,
          "urx": 295.3095703125,
          "ury": 714.0,
          "fill": [
            0.0,
            0.0,
            0.0
          ],
          "overlay_text": "REDACTED",
          "aligned": "center"
        },
        {
          "type": "redaction",
          "llx": 216.0,
          "lly": 673.0,
          "urx": 370.48876953125,
          "ury": 690.0,
          "fill": [
            0.0,
            0.0,
            0.0
          ],
          "overlay_text": "REDACTED",
          "repeating": true,
          "aligned": "left"
        },
        {
          "type": "redaction",
          "llx": 216.0,
          "lly": 649.0,
          "urx": 425.9130859375,
          "ury": 666.0,
          "fill": [
            0.0,
            0.0,
            0.0
          ]
        }
      ]
    }
  ]
}