-
Notifications
You must be signed in to change notification settings - Fork 572
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
Image attachment not shown when converting to PDF #1079
Comments
I am facing the same issue, any solution or workaround? |
Also by doing this in a Markdown cell: \begin{figure}[h!]
\includegraphics{myImage.png}
\end{figure} the exported PDF does not show any image, but an empty blank space instead, by the look of it exactly of the size of the image. |
Okay folks--finding no other way, I ended up breaking down my markdown cells as markdown--python--markdown cells with the middle one as: from IPython.display import display, Image
display(Image(filename="a.png", height=400, width=400)) Now |
Please use regular image syntax in Markdown. attachment:-syntax seems not supported by nbconvert: jupyter/nbconvert#1079
Struggling with this to brand jupyter notebook output with a logo |
@tashrifbillah Thank you for your solution! This worked for me. Hopefully this is resolved soon as this is a pretty common use case. |
Should be fixed with #1978. Please reopen if there are any issues |
The fix above applies to PDF generation via LaTeX ( I don't exactly remember the state of PDF via HTML because I didn't use it much. Also are your relative paths the same? You have both |
My bad, I was confusing those. With Is that a known issue, or should I report the problem in a separate issue? |
#1938 is the same issue, you could leave a comment/reaction if you'd like. |
Okay. Thanks. Will do it. |
Convert that image to base64 and then pass it. import base64
with open("numpylogo.jpeg", "rb") as img:
img_data = str(base64.b64encode(img.read()))[2:-1] now just print that. then copy that huge string (without the single quotes), and replace it where you want to see the markdown image:
remove that that_big_base64_content and paste your content (after the comma), and run. This worked for me |
image_test.ipynb.zip
Running
Jupyter nbconvert --to pdf image_test.ipynb
on a notebook with an attachment![image.png](attachment:image.png)
, the resulting image is not shown. Similar too #699.In nbconvert 5.5 a pdf is still produced, after #1053 this throws an error.
The text was updated successfully, but these errors were encountered: