PDF.js is the latest library from Mozilla, and is a standards-based PDF renderer that is written entirely in Javascript. Currently you cannot access the generated HTML, and the library can only be used as a viewer. Is it possible to use PDF.js to statically convert a PDF to its HTML equivalent? Considering it renders in a browser, it must be HTML+CSS, and the JS would be used only for navigation.
After converting it to HTML I plan to use our existing HTML workflow to import/index/consume the page as if it were an ordinary HTML webpage.
The quickest way to convert your PDF is to open it in Acrobat. Go to the File menu, navigate down to Export To, and select HTML Web Page. Your PDF will automatically convert and open in your default web browser.
This script include's PDF specified by argument to viewer. js Webpack and start browser. const fs = require('fs'); const path = require('path'); const pdf = require('process'). argv[2]; const chp = require('child_process'); const datauri = require(path.
Note: this is for the original question, as well as for others who may be visiting this for related help, as was the case with me. ;)
Answer:
You may try: Poppler or pdf2htmlEX which is based on Poppler.
I'd recommend looking at the pdf2htmlEX documentation it also has as very good comparison table.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With