7 Star 3 Fork 1

Ligo / sumatra-pdf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Sumatra pdf reader node wrapper

安装方法

npm install git+http://dev.ligotop.com/zhangheng/sumatra-pdf.git

安装非 master 分支

npm install git+http://dev.ligotop.com/zhangheng/sumatra-pdf.git#fix-memory 在 package.json 里

 "dependencies": {
   ...
   "sumatra-pdf": "git+http://dev.ligotop.com/zhangheng/sumatra-pdf.git#fix-memory",
   ...
 },

使用方法

var Reader = require('sumatra-pdf');
var pdf = 'filepath';

//options = {pdf: 'path', restrict: false, ... }
var reader = new Reader(options);

// 查看模式,禁止下载和打印文件
// {fullscreen: true, ...}
reader.view(options);

// 后台打印,可用于打印套餐
// print_settings eg:
// "1-3,5,10-8,odd,fit,bin=2" prints pages 1, 3, 5, 9 (i.e. the odd pages from the ranges 1-3, 5-5 and 10-8) and scales them so that they fit into the printable area of the paper.
// "3x" : prints the document 3 times.
reader.silent_print({pdf: 'path', print_settings: '1-10', ...});

// 显示打印对话框,由用户决定怎么打印
// print_settings是否有效未测试
reader.dialog_print({pdf: 'path', print_settings: 'odd', ...});

Ref

空文件

简介

PDF 打印插件 展开 收起
JavaScript 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/ligord/sumatra-pdf.git
git@gitee.com:ligord/sumatra-pdf.git
ligord
sumatra-pdf
sumatra-pdf
master

搜索帮助