Fix #6019: imgconverter: Including multipage PDF fails

This commit is contained in:
Takeshi KOMIYA 2019-02-14 01:03:22 +09:00
parent 89c3c4ab50
commit 4adcb408ea
2 changed files with 4 additions and 3 deletions

View File

@ -18,6 +18,7 @@ Bugs fixed
* LaTeX: Remove extraneous space after author names on PDF title page (refs: #6004)
* #6046: LaTeX: ``TypeError`` is raised when invalid latex_elements given
* #6019: imgconverter: Including multipage PDF fails
Testing
--------

View File

@ -66,9 +66,9 @@ class ImagemagickConverter(ImageConverter):
# type: (unicode, unicode) -> bool
"""Converts the image to expected one."""
try:
if _from.lower().endswith('.gif'):
# when target is GIF format, pick the first frame
_from += '[0]'
# append an index 0 to source filename to pick up the first frame
# (or first page) of image (ex. Animation GIF, PDF)
_from += '[0]'
args = ([self.config.image_converter] +
self.config.image_converter_args +