redaction_incomplete
HTTP 422 · code: "redaction_incomplete" · type: https://docs.formfeed.dev/errors/redaction-incomplete
After /pdf/redact, Formfeed reads the result again (what is checked), and it found something still there that the call was to remove. A redacted file that still holds what it was asked to remove is worse than none, so no file was delivered and nothing was charged. The problem says what was left by number and count, never by its text:
| Field | Present when | Holds |
|---|---|---|
regions | text still lay under a rectangle | Per rectangle: its position in your regions list (region, from 0), its page, and how many pieces of text were left (text_items). |
text | a named text could still be found on a page | Per text and page: its position in your text list (text, from 0), the page, how often it was found (occurrences), and how many of its characters still stood where it was cut out (glyphs). |
places | a named text still stands outside the pages | Where: metadata, outline (bookmarks), attachments, form or annotations. |
copies | a copy of removed text survived that could not be cleared | How many copies; unread counts the parts of the file that could not be read for the search. |
revisions | the result kept an earlier revision | How many revisions the file has; a redacted file has one. |
unread_pages | text of the result could not be read for the check | The pages, set in a font that could not be read. |
Example
{
"type": "https://docs.formfeed.dev/errors/redaction-incomplete",
"title": "Redaction incomplete",
"status": 422,
"detail": "Text under 1 of the 2 regions could not be removed, so no file was delivered",
"code": "redaction_incomplete",
"regions": [{ "region": 1, "page": 1, "text_items": 1 }],
"render_id": "rnd_0d290c45cbeb4554b946bbad1acee87e",
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}
Common causes
- Text drawn in a way the redaction does not take apart, often from a scanner's or an old program's export.
- A text that also stands in the document's metadata or an attachment, which the redaction does not change (
places). - A tagged PDF that keeps the removed words as the text that stands for its content, an ActualText, which cannot be cleared on its own (
copies).
How to fix it
- With
regions: open the file in a viewer, check what sits under the rectangle the problem names, and try again with that rectangle a little larger. - With
places: remove the text from the document's title, bookmarks or attachments in the program the file comes from, or make the file again without them, then redact. - With
copies: make the file again without tags, or redact the text in the program it comes from. - For a form, flatten it first in the program it comes from, so its values become part of the page, then redact.
- If it keeps failing, send the
render_idto support with the file.
Retry?
Not with the same file and request: the result would be the same.