Merge pull request #6071 from tk0miya/6019_imgconverter_multipaged_PDF

Fix #6019: imgconverter: Including multipage PDF fails
This commit is contained in:
Takeshi KOMIYA 2019-02-17 00:13:07 +09:00 committed by GitHub
commit 74ec98bb1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 +