目录
方法一:使用浏览器打印功能
一般快捷键是CTRL+P
![](https://file.jishuzhan.net/article/1730442427770081282/27b4fecdece102e9a8bf1bd8c7fdf6e0.webp)
然后改变目标打印机为另存为PDF
![](https://file.jishuzhan.net/article/1730442427770081282/c5bf565b22c81cf8dc9bf2114954ec96.webp)
这样就可以将notebook保存为PDF了
![](https://file.jishuzhan.net/article/1730442427770081282/37dea09da43c0eeb54ef2fd9750cca52.webp)
方法二:使用nbconvert转换
直接命令 ,换成你的ipynb
!jupyter nbconvert --to pdf /content/drive/MyDrive/ColabNotebooks/notebook.ipynb
如果报错,一般是缺乏软件包,安装这些软件包
!apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic