如何将CSDN的文章保存为PDF?

目录

1、打开CSDN文章

2、按F12或者鼠标右键选择检查并进入控制台


3、在控制台输入以下代码

bash 复制代码
(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();
$(".csdn-side-toolbar").remove();
$(".more-toolbox").remove();
$(".template-box").remove();
$(".left-toolbox").remove();
$(".bottom-pub-footer").remove();
$(".pre-numbering").remove();
$("main").css('display','content'); 
$("main").css('float','left'); 
$("#mainBox").css('width','100%');        
$(".main_father.clearfix.d-flex.justify-content-center").css("width","100%");

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

4、然后回车(Enter)

如果纵向显示不全就横向

相关推荐
百事牛科技4 天前
保护文档安全:PDF限制功能详解与实操
windows·pdf
一个人旅程~4 天前
如何用命令行把win10/win11设置为长期暂停更新?
linux·windows·经验分享·电脑
Factory_Audit4 天前
亚马逊社会责任验厂审核标准及注意事项
大数据·经验分享
江南小书生4 天前
制造业系统赋能成熟度自测表(实操版)
经验分享·非标制造
三流架构师4 天前
述职报告资源合集
经验分享
徐先生 @_@|||5 天前
时间序列异常检测框架CrossAD论文阅读
经验分享·python·机器学习
LaughingZhu5 天前
Product Hunt 每日热榜 | 2026-02-25
数据库·人工智能·经验分享·神经网络·chatgpt
开开心心就好5 天前
安卓开源应用,超时提醒紧急人护独居安全
windows·决策树·计算机视觉·pdf·计算机外设·excel·动态规划
中屹指纹浏览器5 天前
2026 硬核技术实践:浏览器指纹生成算法与风控逆向对抗
经验分享·笔记
给老吕螺丝5 天前
提升国内访问GitHub稳定性的解决方案:Steamcommunity 302工具详解 (Ver.13.0.05+)
经验分享·github