Raise exception if resulting PDF might appear blank in a known in some PDF viewers

Fixes #1187
This commit is contained in:
James R. Barlow
2023-11-09 22:33:22 -08:00
parent e7fa97731f
commit a596ccf844
5 changed files with 37 additions and 7 deletions
+13
View File
@@ -137,3 +137,16 @@ class TaggedPDFError(InputFileError):
override this error.
"""
)
class ColorConversionNeededError(BadArgsError):
"""PDF needs color conversion."""
message = dedent(
"""\
The input PDF has an unusual color space. Use
--color-conversion-strategy to convert to a common color space
such as RGB, or use --output-type pdf to skip PDF/A conversion
and retain the original color space.
"""
)