You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 848c530
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add experimental watermark removal by abnormal font and image size
Add an experimental, off-by-default setting (Settings > Experimental) that hides
likely watermarks while rendering pages. The PDF file is never modified.
Detection runs on the pdf.js operator list and is applied through the
page.render operationsFilter, so only the watermark paint operations are skipped:
- Text runs are removed when much larger than the body text and also diagonal,
translucent, pale, or repeated at the same position across sampled pages.
Diagonal translucent text is removed at a lower size threshold.
- Images covering 8-85% of the page are removed when translucent, pale or
repeated across pages. Full-page images (scans, backgrounds) are kept.
- Size alone never removes anything, so titles, running footers and margin
stamps stay.
- Optional content layers named watermark are hidden.
Render caches are keyed by the filter, and toggling the setting re-renders the
visible pages. Adds analysis unit tests on real pdf.js operator lists and an
Electron canvas pixel smoke test (--smoke-test=watermark).
0 commit comments