7. July 2017 05:58 by admin
One of the big problems with things like Report Server and the RDLC ReportViewer control is being able to render PDF reports in mobile browsers. If you can convert these to HTML on the fly with the right library, mobile browsers will happily render the HTML.
One such library is PDF.js It is extremely easy to install and you can get a PDF report as HTML.
You can set it up as follows:
Extract the ZIP file (a directory called "pdf.js-gh-pages" will be created).
Copy the following directories to your website:
The web/ directory contains a 1 MB PDF file called "compressed.tracemonkey-pldi-09.pdf". This file is only used as an example for the demo and can safely be removed.
If you want to open a PDF from your website with PDF.js, simply link to the viewer and pass the location of the PDF file. For example:
<a href="/web/viewer.html?file=%2Fyourpdf.pdf">Open yourpdf.pdf with PDF.js</a>