[CSDN] CSDN articles are saved as PDF

Method 1 :
If you use Firefox, use the ready-made plug-in: PDF Saver For CSDN Blog
Insert picture description here

Method two :
Google Chrome browser

Open developer tools
Shortcut: Ctrl+Shift+I
Insert picture description here
Developer tools icon:
Insert picture description here

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
Insert picture description here

PS : The above methods are all HTMLconversion PDF, so if the blog post exists GIF图, PDFit will become a static picture after being converted to the format.

Guess you like

Origin blog.csdn.net/weixin_40774605/article/details/104610149