-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including multipage pdf via imgconverter fails #6019
Comments
Thus the images would be located one below the other in output html ? |
Yes, I believe that’s the best we could do. |
-1 for putting all images in PDF. But +1 to avoid crash. It would not work fine on |
@tk0miya What are the issues you foresee with the figure directive? If it’s related to caption it might be possible to just repeat the caption, possibly with a sequence number added (x of y). |
Yes, I'm worry about caption. And I feel strange to modify structure of document. Is it same as other formats? imgconverter is called only if output format does not support the image. |
I finally got time to check how building a PDF via LaTeX handles multipage PDF:s included as images.
|
Thank you for investigation. I determined to pick up the first page of the PDF by imgconverter. #6071 would fix the error. |
Thanks! Looks good as a first step, it should fix the error! I would like to ask you to continue consider implementing support for including all pages of included PDFs as an option. In our case it would be very useful and save a lot of manual labor. If implemented as an configurable option (preferably in the rst on the directive, rather than in conf.py) I think that the caption and any options could be repeated for each page/picture included. |
Fix #6019: imgconverter: Including multipage PDF fails
Merged #6071 now. I'm not interested in your idea. The semantics of |
Ok, in that case we will look into a custom solution. Thanks for fixing the bug. |
:-) |
Describe the bug
I use
sphinx.ext.imgconverter
in combination withImageMagick
to include existing PDFs via the.. image::
directive. This works well with single page PDFs but fails if the PDF contain more than one page.Error:
To Reproduce
.. image:: multipage.pdf
directivemultipage.pdf
make html
Expected behavior
Expected that all pages would be included in the produced output.
Instead the
_build/doctrees/images/
directory contain one png per pagemultipage-1.png
,multipage-2.png
etc. but these are not copied to the_build/html/_images/
directory and the generated html page references the filemultipage.png
rather than eachmulipage-1.png
,mulipage-2.png
etc.Your project
N/A
Screenshots
N/A
Environment info
OS: Win10
Python version: 3.7.0
Sphinx version: 1.7.9
Sphinx extensions:
'sphinx.ext.todo',
'sphinx.ext.ifconfig',
'sphinx.ext.graphviz',
'sphinx.ext.imgconverter',
'sphinx.ext.intersphinx',
'sphinxcontrib.mermaid',
'sphinxcontrib.jinja',
'sphinxcontrib.bibtex',
'sphinxcontrib.needs',
'sphinxcontrib.visio',
'sphinxcontrib.exceltable',
'sphinxcontrib.programoutput',
'sphinxcontrib.plantuml',
'sphinx_markdown_tables',
'hieroglyph',
'pptshape.directive'
Extra tools: ImageMagick 7.0.8-12
Additional context
N/A
The text was updated successfully, but these errors were encountered: