Method 1 :
If you use Firefox, use the ready-made plug-in: PDF Saver For CSDN Blog
Method two :
Google Chrome browser
Open developer tools
Shortcut: Ctrl+Shift+I
Developer tools icon:
Enter the following code in 5 and click Enter
(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();
})();
It is recommended to check this option, the code will look better
PS : The above methods are all HTML
conversion PDF
, so if the blog post exists GIF图
, PDF
it will become a static picture after being converted to the format.