[IPython-dev] Export notebook to image >>> not editable print view
Thomas Kluyver
takowl at gmail.com
Fri Apr 20 18:42:34 EDT 2012
Immediate thought: not as an image, please. Documents saved as images
are inefficient and unhelpful (want to copy some text? hard luck!). If
we're going to use the browser in a way like that, I'm pretty sure
it's possible to export a PDF, which at least keeps text as text. See
e.g. http://code.google.com/p/wkhtmltopdf/ , which uses QWebkit for a
similar purpose.
Also, I don't think this is an alternative to a real static HTML
export. The notebook shouldn't depend on having PyQt/PySide installed
on either the server or the client. It could be useful as a temporary
measure while we work out the details of producing static HTML,
though.
Thanks,
Thomas
On 20 April 2012 19:31, Damián Avila <damianavila at gmail.com> wrote:
> Working in a ipython notebook plugin for an ide, I realize that the print
> view of the notebook is functional notebook, and hence, it is editable.
> For a print view, it would be a better options to get an non-editable
> notebook. There was a little discussion in github around this topic
> (https://github.com/ipython/ipython/issues/1292). Brian propose to generate
> a static html for the print view. Then, I proposed another way, so I bring
> the discussion here:
>
> We can capture the notebook into a png (and other format) images using
> qwebkit inside PyQt (we have the last one as dependency for Qt console). In
> this way, first, we can support another ways of export the notebook, such as
> images...
> Then, we can import this notebook images inside PyQt objects and displayed
> into the javascript enviroment...
> I wrote a little script to capture a complete image of the notebook and show
> the image inside a web browser and it is displaying great, like the notebook
> itself.
>
> Another way to have a non editable print view would be an export to a raw
> html (https://github.com/ipython/ipython/issues/860), but we have to deal
> with MathJax, CodeMirror and Markdown.
>
> What do you think about the "image" way to generate a non-editable view of
> the notebook? I think it would be easy to implement.
>
> Regards.
>
> Damián.
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
More information about the IPython-dev
mailing list