print pdf bug & DOCTYPE
2024-09-30 09:17:13
print pdf bug & DOCTYPE
OK
with
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="author" content="xgqfrms">
<meta name="generator" content="VS code">
<title></title>
</head>
<body>
<section>
<h1>
<a href="https://feiqa.xgqfrms.xyz/index.html"></a>
</h1>
</section>
</body>
</html>
error
no
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="author" content="xgqfrms">
<meta name="generator" content="VS code">
<title></title>
</head>
<body>
<section>
<h1>
<a href="https://feiqa.xgqfrms.xyz/index.html"></a>
</h1>
</section>
</body>
</html>
let html = document.querySelector(`html`);
// let text = html.innerHTML;
text += `
<style>
@media print {
@page {
margin: 0;
}
}
</style>
`;
@media print {
@page { margin: 0; }
body { margin: 1.6cm; }
}
https://stackoverflow.com/questions/46077392/additional-options-in-chrome-headless-print-to-pdf
最新文章
- seajs hello world
- ndk学习15: IPC机制
- CentOS 6 使用 yum 安装MongoDB及服务器端配置
- 用SDWebImage渐变加载图片
- 安装redis监控
- iOS8 VPN 应用内连接
- ASP.Net 5 上传文件通过虚拟路径存储
- java笔记--关于线程通信
- svn搭建,很简单
- play framework 框架安装及myeclipse 导入项目
- uglifyjs使用
- Android:创建可穿戴应用 - 自定义布局
- hdu 4585 Shaolin_set用法
- Php连接及读取和写入mysql数据库的常用代码
- jquery.qrcode.min.js(支持中文转化二维码)
- JAVAscript学习笔记 js事件 第一节 (原创) 参考js使用表
- C# .NET枚举Enum项获取
- git教程:添加远程仓库
- More is better
- odoo 11导入外部数据过程记录