Node.js and NPM are required.
- Install dependencies using
npm install. - Change the absolute paths in the
hrefof the 'Direct link' inindex.htmland in the redirect handler inindex.jsaccording to your local repository path of the filetest.pdf. - Start the minimal web server using
node index.js. - Add
http://localhost:8080/to the FirefoxLocalFileLinks(inpolicies.json). - Use
about:configin Firefox to setnetwork.protocol-handler.expose.filetofalseandnetwork.protocol-handler.external.filetotrue. - Use the Firefox settings to set the default action for PDF files to "Open in Firefox".
- Firefox might need a restart (at least for the changes in step 4).
- In Firefox, navigate to
http://localhost:8080. - Click on the link that says "Direct link". Firefox will open the file
test.pdfusing the default PDF viewer of the system (e.g. Adobe Reader). - Click on the link that says "Link with redirect". Firefox will open the file
test.pdfusing the builtin PDF viewer instead ot the default PDF viewer of the system.