Skip to content
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

Embedded images do not print if referenced as html #6191

Open
callegar opened this issue Sep 28, 2021 · 1 comment
Open

Embedded images do not print if referenced as html #6191

callegar opened this issue Sep 28, 2021 · 1 comment

Comments

@callegar
Copy link

Describe the bug

Notebooks can have embedded images. These images work just fine if they are referenced via markdown. However if they are referenced using html they display fine but they do not print.

As an example, suppose that you have a notebook and that you insert in a cell an image named new.jpg. This gives you the following markdown:

![new.jpg](attachment:new.jpg)

that works just fine.

However if you try to use that figure changing the above into what should be the equivalent html (e.g. to get more control over the image size, centering, etc.) as in

<div><center>
<img src="attachment:new.jpg">
</center></div>

that works correctly on screen but when you try to print using the File->Print feature, the image is broken in the preview and in the printout.

The issue is present both with jupyter notebook and with jupyter lab.

@callegar
Copy link
Author

As a workaround, because you are using html anyways, you can use base64 encoded images inline. This is extremely ugly when you expand the cell to edit it, but at least it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant