File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,8 @@ def generate_previews(ra_dict):
322
322
"""
323
323
_format = ' Warning: generate_previews -- %s -- %s'
324
324
cmd_o = 'gs -q -o "%s" -sDEVICE=pngalpha -dLastPage=1 "%s"'
325
- cmd_p = 'convert "%s" -resize x200 "%s"'
326
-
325
+ # cmd_p = 'convert "%s" -resize x200 "%s"'
326
+ cmd_p = 'gs -q -o "%s" -sDEVICE=pngalpha -dLastPage=1 -dDEVICEHEIGHTPOINTS=200 -dDEVICEWIDTHPOINTS=200 -dFitPage "%s"'
327
327
for label , resource_dict in list (ra_dict .items ()):
328
328
if 'PDF' in list (resource_dict .keys ()):
329
329
pdf_path = check_pdf_path (resource_dict ['PDF' ], label )
@@ -346,7 +346,7 @@ def generate_previews(ra_dict):
346
346
snapshot_preview = os .path .join (tmp_path , SNAPSHOT_P )
347
347
348
348
# Make the snapshot_thumbnail
349
- os .system (cmd_p % (snapshot_original , snapshot_preview ))
349
+ os .system (cmd_p % (snapshot_preview , snapshot_original ))
350
350
351
351
if not os .path .exists (snapshot_original ) or \
352
352
not os .path .exists (snapshot_preview ):
Original file line number Diff line number Diff line change 61
61
62
62
# Cmd:
63
63
GS_CMD = """gs -q -o {original} -sDEVICE=pngalpha -dLastPage=1 {pdf_path}"""
64
- CONVERT_CMD = """convert {original} -resize x200 {preview}"""
64
+ #CONVERT_CMD = """convert {original} -resize x200 {preview}"""
65
+ CONVERT_CMD = """gs -q -o {preview} -sDEVICE=pngalpha -dLastPage=1 -dDEVICEHEIGHTPOINTS=200 -dDEVICEWIDTHPOINTS=200 -dFitPage {original}"""
65
66
GS_CMD2 = """gs -q -o {original} -sDEVICE=pngalpha {pdf_path}"""
66
67
67
68
# WARNING content for emails
You can’t perform that action at this time.
0 commit comments