Hi there,

Fyi, for now I've found a temporary workaround involving converting the 
ipynb files to html first and then printing the output html document to pdf.
An updated response has been provided on 
stackoverflow: 
https://stackoverflow.com/questions/49754862/jupyter-notebook-save-to-pdf-without-code
 
and also on github: https://github.com/jupyter/notebook/issues/3804

Any guidance on this would be appreciated,
j

On Sunday, July 29, 2018 at 8:00:47 PM UTC-4, jclau wrote:
>
> Hi there,
>
> I would like to export a Jupyter notebook containing Markdown + R code + 
> outputs with just Markdown + outputs. I've been following a solution posted 
> on StackOverflow where they suggest setting the 
> "--TemplateExporter.exclude_input" flag: 
> https://stackoverflow.com/questions/49754862/jupyter-notebook-save-to-pdf-without-code
>
> The following solution works as expected when exporting to html:
>
>> $ jupyter nbconvert volume_stats.ipynb --to=html 
>> --TemplateExporter.exclude_input=True
>> [NbConvertApp] Converting notebook volume_stats.ipynb to html
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nbconvert/filters/datatypefilter.py:41:
>>  
>> UserWarning: Your element with mimetype(s) [] is not able to be represented.
>>   mimetypes=output.keys())
>> [NbConvertApp] Writing 907954 bytes to volume_stats.html
>
>
> However, switching the export to pdf does not work:
>
>> $ jupyter nbconvert volume_stats.ipynb --to=pdf 
>> --TemplateExporter.exclude_input=True
>> [NbConvertApp] Converting notebook volume_stats.ipynb to pdf
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nbconvert/filters/datatypefilter.py:41:
>>  
>> UserWarning: Your element with mimetype(s) [] is not able to be represented.
>>   mimetypes=output.keys())
>> [NbConvertApp] Support files will be in volume_stats_files/
>> [NbConvertApp] Making directory volume_stats_files
>> [NbConvertApp] Making directory volume_stats_files
>> [NbConvertApp] Making directory volume_stats_files
>> [NbConvertApp] Making directory volume_stats_files
>> [NbConvertApp] Making directory volume_stats_files
>> [NbConvertApp] Making directory volume_stats_files
>> [NbConvertApp] Writing 35763 bytes to notebook.tex
>> [NbConvertApp] Building PDF
>> [NbConvertApp] Running xelatex 3 times: [u'xelatex', u'notebook.tex']
>> [NbConvertApp] Running bibtex 1 time: [u'bibtex', u'notebook']
>> [NbConvertApp] WARNING | bibtex had problems, most likely because there 
>> were no citations
>> [NbConvertApp] PDF successfully created
>> [NbConvertApp] Writing 366844 bytes to volume_stats.pdf
>
>
> Version info:
>
>> Server Information:
>> You are using Jupyter notebook.
>> The version of the notebook server is: 5.5.0
>> The server is running on this version of Python:
>> Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) 
>> [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
>> Current Kernel Information:
>> R version 3.4.3 (2017-11-30)
>
>
> Fyi, I've cross-posted this as an issue on github: 
> https://github.com/jupyter/notebook/issues/3804. Appreciate the help,
> j
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/c7a0f525-512c-445e-8045-1c44762610a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to