【CSDN】 CSDN文章保存为PDF

方法一
若使用火狐浏览器,借助现成的插件: PDF Saver For CSDN Blog
在这里插入图片描述

方法二
Google Chrome浏览器

打开开发者工具
快捷方式:Ctrl+Shift+I
在这里插入图片描述
开发者工具图示:
在这里插入图片描述

在5中输入以下代码后点击回车即可

(function(){
    
    
$("#side").remove();
$("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
$(".nav_top_2011, #header, #navigator").remove();
$(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box").remove();
$("aside").remove();
$(".tool-box").remove();
$("main").css('display','content'); 
$("main").css('float','left'); 
window.print();

$("tool-box").remove();
})();

建议勾选该项,代码会好看些
在这里插入图片描述

PS:以上方法均为HTMLPDF,因此若博文中存在GIF图,转为PDF格式后将变为静态图片。

猜你喜欢

转载自blog.csdn.net/weixin_40774605/article/details/104610149