support pdf export in the notebook UI

pull/37/head
MinRK 12 years ago
parent 4ee5df3f50
commit f7c1a15896

@ -73,7 +73,7 @@ class NbconvertFileHandler(IPythonHandler):
@web.authenticated
def get(self, format, path='', name=None):
exporter = get_exporter(format, config=self.config)
exporter = get_exporter(format, config=self.config, log=self.log)
path = path.strip('/')
model = self.notebook_manager.get_notebook(name=name, path=path)

@ -1,9 +1,5 @@
//----------------------------------------------------------------------------
// Copyright (C) 2008-2011 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
// Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
//============================================================================
// MenuBar
@ -125,6 +121,10 @@ var IPython = (function (IPython) {
that._nbconvert('rst', true);
});
this.element.find('#download_pdf').click(function () {
that._nbconvert('pdf', true);
});
this.element.find('#rename_notebook').click(function () {
IPython.save_widget.rename_notebook();
});

@ -84,6 +84,7 @@ class="notebook_app"
<li id="download_py"><a href="#">Python (.py)</a></li>
<li id="download_html"><a href="#">HTML (.html)</a></li>
<li id="download_rst"><a href="#">reST (.rst)</a></li>
<li id="download_pdf"><a href="#">PDF (.pdf)</a></li>
</ul>
</li>
<li class="divider"></li>

Loading…
Cancel
Save