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

Cells cannot output in PDF format #223

Closed
knuesel opened this issue Nov 22, 2022 · 2 comments · Fixed by #226
Closed

Cells cannot output in PDF format #223

knuesel opened this issue Nov 22, 2022 · 2 comments · Fixed by #226

Comments

@knuesel
Copy link
Contributor

knuesel commented Nov 22, 2022

Would it be possible to support PDF output from cells?

For example executing the following cell:

%plot -f pdf

plot(magic(2))

gives the error Cannot embed the 'pdf' image format.

Having cells with PDF output doesn't sound useful for a notebook but it's actually super useful when using a Jupyter kernel as execution engine to build PDF documents (this is better explained here: JuliaLang/IJulia.jl#1035 (comment) ).

For example in Python with Matplotlib the following works:

%config InlineBackend.figure_formats = ['pdf']

import matplotlib.pyplot as plt

plt.plot([1, 2, 3, 4])
plt.show()

(In the notebook GUI it shows a link to view the PDF.)

@knuesel
Copy link
Contributor Author

knuesel commented Nov 22, 2022

I think I have a working solution for this and will submit a PR by the end of the week if that's fine with you.

@blink1073
Copy link
Contributor

Sounds good, thanks!

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

Successfully merging a pull request may close this issue.

2 participants