admin管理员组文章数量:1225483
i Have a big pdf file and i would like to split it in separate PDF files, each page in separate file.
It is possible to do that in JS with node module.
I search but in npm i just have modules that convert html to pdf
i Have a big pdf file and i would like to split it in separate PDF files, each page in separate file.
It is possible to do that in JS with node module.
I search but in npm i just have modules that convert html to pdf
Share Improve this question edited Dec 29, 2016 at 10:11 Cœur 38.7k26 gold badges202 silver badges277 bronze badges asked Oct 9, 2015 at 13:09 shmoolkishmoolki 1,5719 gold badges35 silver badges58 bronze badges2 Answers
Reset to default 7After a lot of searching and nearly giving up, I did eventually find that the HummusJS library will do what I want to do! thanks to @Taxilian
See this post How can I create a customized version of an existing pdf file with node.js?
PDF format too complex for handling it via javascript. Can't find any js libs, that doing it well
It's easy to use other pdf parsing software and run it from node.js
use pdftk for splitting pdf
pdftk input.pdf burst output output_%02d.pdf
and run it via child-process
var exec = require('child_process').exec,
child;
child = exec('pdftk input.pdf burst output output_%02d.pdf',
function (error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
});
pdftk split pdf with multiple pages
maybe you can find node module for using pdftk, but it's too easy to run it by yourself
本文标签: nodejsSplit PDF in separate file in JavascriptStack Overflow
版权声明:本文标题:node.js - Split PDF in separate file in Javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739405099a2161799.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论