- Unfortunately, upstream library PyMuPDF is quite buggy for rotated or scaled pages. Thus, I
- reimplemented the determination of rotation or derotation matrix from pages that can be used with scaled pages
- feed rotated redaction rectangles (with page’s derotation matrix to PyMuPDF’s redaction annotations
- reimplemented the drawing of the final redaction rectangles
- Further, instead of removing links, widgets and annotations if they intersect with redaction rectangles, they will be now removed if they "overlap", means not only touching with their borders. Also, tests for overlapping with points and lines have been added.
- Additionally, the safer sanitization function was simplified. Because also PyMuPDF’s function
Document.insert_pdfwas not reliably copying I reimplemented- copying of links to have proper location on rotated/scaled pages
- copying of widgets, which were sometimes silently lost for I don’t know which reason
Closes #161
1. Unfortunately, upstream library PyMuPDF is quite buggy for rotated or scaled pages. Thus, I
- reimplemented the determination of rotation or derotation matrix from pages that can be used with scaled pages
- feed rotated redaction rectangles (with page’s derotation matrix to PyMuPDF’s redaction annotations
- reimplemented the drawing of the final redaction rectangles
2. Further, instead of removing links, widgets and annotations if they intersect with redaction rectangles, they will be now removed if they "overlap", means not only touching with their borders. Also, tests for overlapping with points and lines have been added.
3. Additionally, the safer sanitization function was simplified. Because also PyMuPDF’s function `Document.insert_pdf` was not reliably copying I reimplemented
- copying of links to have proper location on rotated/scaled pages
- copying of widgets, which were sometimes silently lost for I don’t know which reason
Closes #161