Electron JS 打印 pdf 文件
2023-07-07 09:24
nodejs
SQL Server
Oracle
MySQL
PostgreSQL
NoSQL
大数据
其他数据库
Windows
Windows Server
Linux
macOS
嵌入式
APACHE
NGINX
redis
Docker
git
互联网
tomcat
Html/Css
JavaScript
jQuery
HTML5
Angular
React
Vue
小程序
架构设计
面向对象
设计模式
领域驱动设计
Android开发
iOS开发
Flutter
鸿蒙
其他手机开发
敏捷开发
项目与团队管理
软件工程其他
.NET
Java
Python
Go
PHP
C++
Ruby
Swift
C语言
Erlang
Delphi
Scala
R语言
Verilog
Dart
Rust
其他语言
asp
nodejs
读书区
翻译区
求职面试
计算机图形学
软件测试
菜谱
SEO技术
摄影
生活技巧
131
0
0
0
标题录入
封面图
Electron 支持使用 web 页面打印 pdf 文件,可以使用 web 页面的 Print 功能将 pdf 打印出来。这可以通过在 web 页面中加载 pdf 文件实现,可以使用 HTML <embed> 标签来加载 pdf 文件,如下所示: ``` <embed src="mydocument.pdf" width="100%" height="100%" /> ``` 然后,可以使用 web 页面的 print 功能打印 pdf 文件。 此外,Electron 还支持使用 node.js API 来打印 pdf 文件。可以使用 node.js 的 printer 模块来实现,如下所示: ``` const printer = require('printer'); printer.printFile({ filename: 'mydocument.pdf', printer: 'My Printer', success: function (jobID) { console.log("Printed with jobID: " + jobID); }, error: function (err) { console.log(err); } }); ```
上一篇:
如何区分 JavaScript 和 nodejs?
下一篇:
如何让一个 JavaScript文件变得像 Linux命令一样可执行?
标题录入,一次不能超过6条
脑袋里突然灵光一现,如果不写下来,过后就想不起来了
T:0.008686s,M:156.02 KB
返回顶部
留言
留言
评论