[IPython-User] Automatically embedding PDF version of figures

Jon Wilson jsw@fnal....
Wed Jan 23 11:10:58 CST 2013

Hi Matthias,
Thanks for the reply.  I will probably have some time to look at/work on 
this tomorrow in the afternoon (central US time).  I was thinking about 
trying to hook into the pylab inline backend -- have it send both the 
png and the pdf as a payload.  With a data URI, is it possible to have a 
clickable link-like tag that will cause the user agent to request to 
save a file?  In that scenario, is it possible to give the saved file a 

On 01/23/2013 02:33 AM, Matthias BUSSONNIER wrote:
> Hi John,
> Thank for your feedback, and happy for you that you will soon publish,
> It is nice to see people using IPython Notebook from end to end as it is our goal.
> To get back to your problem, and supposing you are using matplotlib,
> I suggest you switch the backend to SVG.
>   %config InlineBackend.figure_format = 'svg'
> for only the current session, or
> c.InlineBackend.figure_format = 'svg'
> in your profile.
> Nbconvert will be smart enough to extract the svg and make pdf from them if you issue a
> $ nbconvert --format latex yourfile.ipynb
> As usually the sag render well in browser, It will  not make png from svg for the html format,
> but that shouldn't be too hard to add.
> Concerning the clickable png that lead to the PDF, it shouldn't need too much change
> on nbconvert either, and will likely not be much more complicated than adding the link by hand in the HTML.
> As we are currently rebuilding nbconvert from the ground up, those feature will probably not
> be integrated in the current version, but depending how much time you have, we could
> probably hack things quickly to do something for you.
> If this seem ok to you, I'll let you open a issue on nbconvert issue tracker, and then we'll see what we can do.

More information about the IPython-User mailing list