the default PDF/A icc profile is /usr/share/color/icc/sRGB.icc, /usr/share/color/icc/OpenICC/sRGB.icc or /usr/share/color/icc/colord/sRGB.icc depending on which one exists
This commit is contained in:
parent
33139612f8
commit
29921eeabd
1 changed files with 16 additions and 2 deletions
|
@ -3766,6 +3766,17 @@ def gui():
|
||||||
app.mainloop()
|
app.mainloop()
|
||||||
|
|
||||||
|
|
||||||
|
def get_default_icc_profile():
|
||||||
|
for profile in [
|
||||||
|
"/usr/share/color/icc/sRGB.icc",
|
||||||
|
"/usr/share/color/icc/OpenICC/sRGB.icc",
|
||||||
|
"/usr/share/color/icc/colord/sRGB.icc",
|
||||||
|
]:
|
||||||
|
if os.path.exists(profile):
|
||||||
|
return profile
|
||||||
|
return "/usr/share/color/icc/sRGB.icc"
|
||||||
|
|
||||||
|
|
||||||
def get_main_parser():
|
def get_main_parser():
|
||||||
rendered_papersizes = ""
|
rendered_papersizes = ""
|
||||||
for k, v in sorted(papersizes.items()):
|
for k, v in sorted(papersizes.items()):
|
||||||
|
@ -4036,10 +4047,13 @@ RGB.""",
|
||||||
outargs.add_argument(
|
outargs.add_argument(
|
||||||
"--pdfa",
|
"--pdfa",
|
||||||
nargs="?",
|
nargs="?",
|
||||||
const="/usr/share/color/icc/sRGB.icc",
|
const=get_default_icc_profile(),
|
||||||
default=None,
|
default=None,
|
||||||
help="Output a PDF/A-1b compliant document. By default, this will "
|
help="Output a PDF/A-1b compliant document. By default, this will "
|
||||||
"embed /usr/share/color/icc/sRGB.icc as the color profile.",
|
"embed either /usr/share/color/icc/sRGB.icc, "
|
||||||
|
"/usr/share/color/icc/OpenICC/sRGB.icc or "
|
||||||
|
"/usr/share/color/icc/colord/sRGB.icc as the color profile, whichever "
|
||||||
|
"is found to exist first.",
|
||||||
)
|
)
|
||||||
|
|
||||||
sizeargs = parser.add_argument_group(
|
sizeargs = parser.add_argument_group(
|
||||||
|
|
Loading…
Reference in a new issue