csdn export article pdf

(function(){
    'use strict';
    var articleBox = $("div.article_content");
    articleBox.removeAttr("style");
    $("#btn-readmore").parent().remove();
    $("#side").remove();
    $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
    $(".nav_top_2011, #header, #navigator").remove();
    $(".csdn-side-toolbar,.template-box,.reward-user-box").remove();
    $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box,#dmp_ad_58, .more-toolbox, .article-info-box, .btn-readmore").remove();
    $("aside").remove();
    $(".tool-box").remove();
	$("#toolBarBox").remove();
    $("main").css('display','content');
    $("main").css('float','left');
    $("#mainBox").css('width','100%');     
    $(".main_father.clearfix.d-flex.justify-content-center").css("width","100%"); //显示不全关键在于修改这里的width的比例
    window.print();																  // 修改成 90% 基本就可以显示全
})();

Open the console and enter the above code, you can

I use the Edge browser

 

 

Guess you like

Origin blog.csdn.net/qq_30436011/article/details/129422934