redactPdf, redactText, findTextRegions, or POST /v1/redact, read this page.
Region coordinates are on the page as displayed
A region’sx and y are now points from the top-left corner of the visible page (the CropBox, clipped to the MediaBox), after the page’s /Rotate is applied. These are the coordinates a PDF viewer shows, such as a pdf.js viewport at scale 1, and the Dashboard editor.
What to do:
- If you compute regions from a viewer (for example pdf.js
page.getViewport({ scale: 1 })), they are now correct as they are. - If you computed regions against the unrotated MediaBox to work around 0.33.0, remove that adjustment.
- Regions from
findTextRegionsare in the new frame and can be passed straight toredactPdf.
Vector graphics under a region are removed
Paths under a region are cut at the region’s edges, not only covered. Parts outside the region stay. Curves in a cut path are redrawn as straight segments within 0.05 pt, which is not visible at normal zoom.New refusals
Where Forme cannot remove content safely, it returns an error that starts withRedaction refused: and no PDF. The hosted API answers 422 with code REDACTION_REFUSED. New in 0.34.0:
- a page whose
/Rotateis not a multiple of 90, or that sets/UserUnit, when it has a region; - a region coordinate that is not a finite number;
- paths inside a form XObject under a region (text and images there were already refused);
- an area painted with a tiling pattern under a region;
- text drawn with a Type3 font that may lie under a region;
- text used as a clipping path (rendering modes 4 to 7) under a region.
Redaction refused: as “this document cannot be redacted automatically”. Do not fall back to an unredacted copy. Options: flatten the document to images first, or redact it with a tool that rasterizes the affected page.