admin管理员组文章数量:1026989
Is there a way to convert a pdf file into html file using JavaScript or jquery? Can this be done on client side and run locally?
So far I have only found server side solutions like pdf2htmlEX
Maybe there is library?
Is there a way to convert a pdf file into html file using JavaScript or jquery? Can this be done on client side and run locally?
So far I have only found server side solutions like pdf2htmlEX
Maybe there is library?
Share Improve this question edited May 25, 2016 at 16:12 0101 asked May 25, 2016 at 15:32 01010101 1,0963 gold badges14 silver badges25 bronze badges2 Answers
Reset to default 2Only in nodejs I think. You can run
npm install pdftohtmljs
Then in your server code:
var pdftohtml = require('pdftohtmljs');
var converter = new pdftohtml('file.pdf', "file.html");
// see https://github./fagbokforlaget/pdftohtmljs/blob/master/lib/presets/ipad.js
converter.convert('ipad').then(function() {
console.log("converted");
}).catch(function(err) {
console.log(err);
});
Alternatively, use this software which is easy to use from the mand line.
I doubt this is possible at this moment. Perhaps PDF.js by Mozilla can get you in the right direction:
https://mozilla.github.io/pdf.js/
and the github repo
https://github./mozilla/pdf.js
Is there a way to convert a pdf file into html file using JavaScript or jquery? Can this be done on client side and run locally?
So far I have only found server side solutions like pdf2htmlEX
Maybe there is library?
Is there a way to convert a pdf file into html file using JavaScript or jquery? Can this be done on client side and run locally?
So far I have only found server side solutions like pdf2htmlEX
Maybe there is library?
Share Improve this question edited May 25, 2016 at 16:12 0101 asked May 25, 2016 at 15:32 01010101 1,0963 gold badges14 silver badges25 bronze badges2 Answers
Reset to default 2Only in nodejs I think. You can run
npm install pdftohtmljs
Then in your server code:
var pdftohtml = require('pdftohtmljs');
var converter = new pdftohtml('file.pdf', "file.html");
// see https://github./fagbokforlaget/pdftohtmljs/blob/master/lib/presets/ipad.js
converter.convert('ipad').then(function() {
console.log("converted");
}).catch(function(err) {
console.log(err);
});
Alternatively, use this software which is easy to use from the mand line.
I doubt this is possible at this moment. Perhaps PDF.js by Mozilla can get you in the right direction:
https://mozilla.github.io/pdf.js/
and the github repo
https://github./mozilla/pdf.js
本文标签: Convert pdf file to html file in JavaScriptjquery on client sideStack Overflow
版权声明:本文标题:Convert pdf file to html file in JavaScriptjquery on client side? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745656955a2161652.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论