diff --git a/CHANGES b/CHANGES index ba2f15cb9..669c29062 100644 --- a/CHANGES +++ b/CHANGES @@ -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 -------- diff --git a/sphinx/ext/imgconverter.py b/sphinx/ext/imgconverter.py index 79755d351..b0b379936 100644 --- a/sphinx/ext/imgconverter.py +++ b/sphinx/ext/imgconverter.py @@ -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 +