Convert pdf file to html file in JavaScriptjquery on client side? - Stack Overflow

Is there a way to convert a pdf file into html file using JavaScript or jquery? Can this be done on cli

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 badges
Add a ment  | 

2 Answers 2

Reset to default 2

Only 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745656956a4638598.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信