Description
(削除) Applying redactions for 99d7576e1e/tests/document_test.py (L279-282) fails likely due to empty pages. (削除ここまで)
samples_pypdf
Lines 34 to 36 in 96bd89f
# TODO: support documents with unreadable meta data
if '017-unreadable-meta-data' in root:
continue
samples_qpdf
Lines 78 to 124 in 96bd89f
# TODO: empty file?
if file in [
'append-xref-loop.pdf',
'bad-direct-root.pdf',
'bad11.pdf',
'bad40.pdf',
'c-empty.pdf',
'empty.pdf',
'enc-XI-R6,V5,U=view,O=master.pdf',
'enc-XI-R6,V5,U=view,attachments,cleartext-metadata.pdf',
'enc-XI-R6,V5,U=wwwww,O=wwwww.pdf',
'enc-XI-long-password.pdf',
'filter-on-write-out.pdf',
'filter-on-write.pdf',
'fuzz-16214.pdf',
'indirect-r-arg.pdf',
'inspect.pdf',
'issue-100.pdf',
'issue-101.pdf',
'issue-119.pdf',
'issue-120.pdf',
'issue-141a.pdf',
'issue-143.pdf',
'issue-146.pdf',
'issue-147.pdf',
'issue-148.pdf',
'issue-150.pdf',
'issue-335a.pdf',
'issue-99b.pdf',
'many-nulls.pdf',
'object-stream-self-ref.pdf',
'pages-is-page.pdf',
]:
continue
# TODO: yet another error?
# mupdf.FzErrorSyntax: code=8: invalid key in dict
if file in [
'issue-99.pdf',
]:
continue
# TODO: yet another error?
# mupdf.FzErrorSyntax: code=8: syntax error in object
if file in [
'eof-reading-token.pdf',
'issue-117.pdf',
]:
continue
samples_pikepdf
Lines 145 to 153 in 96bd89f
# MuPDF error: syntax error: invalid key in dict
# syntax error: syntax error in object (94 0 R)
# syntax error: expected object number
# format error: Repair failed already - not trying again
# mupdf.FzErrorSyntax: code=8: invalid key in dict
if file in [
'378014596.pdf',
]:
continue
samples_poppler
Lines 266 to 269 in 96bd89f
if file in [
'mask.pdf',
]:
continue
Impact
(削除) Seems rarely to happen (2 of almost 1,000 PDF sample files) and user is warned about, but may loose redactions of other pages. Thus, it should lead to a warning instead of failure of saving. Check ... (削除ここまで)
Edit: Since !169 (tests fixed in !171), the concerning documents are failing to open (with a warning message) and thus, I am not concerned about the impact.
## Description
~Applying redactions for https://codeberg.org/censor/Censor/src/commit/99d7576e1e57903d9e45a65d85364cf2a73c9af9/tests/document_test.py#L279-282 fails likely due to empty pages.~
#### `samples_pypdf`
https://codeberg.org/censor/Censor/src/commit/96bd89f19a24bb2b9d6c8ec89e6546fd730f271f/tests/document_samples.py#L34-L36
#### `samples_qpdf`
https://codeberg.org/censor/Censor/src/commit/96bd89f19a24bb2b9d6c8ec89e6546fd730f271f/tests/document_samples.py#L78-L124
#### `samples_pikepdf`
https://codeberg.org/censor/Censor/src/commit/96bd89f19a24bb2b9d6c8ec89e6546fd730f271f/tests/document_samples.py#L145-L153
#### `samples_poppler`
https://codeberg.org/censor/Censor/src/commit/96bd89f19a24bb2b9d6c8ec89e6546fd730f271f/tests/document_samples.py#L266-L269
## Impact
~Seems rarely to happen (2 of almost 1,000 PDF sample files) and user is warned about, but may loose redactions of other pages. Thus, it should lead to a warning instead of failure of saving. Check ...~
Edit: Since !169 (tests fixed in !171), the concerning documents are failing to open (with a warning message) and thus, I am not concerned about the impact.