Recently in the mobile app to develop the Android version of the need to display a PDF file, remember the previous direct use of the system browser or WebView can be displayed, but now can not, can only find another way.
Finally found the pdf.js to implement, but in the test to find that some Chinese can not be displayed, but the use of GitHub on the example is available, clone to local after the reason for viewing.
I configured the environment to use Chrome for debugging in an IIS environment to find that a file failed to load properly, including the. properties file and the. bcmap file. In the sense that the previous experience should be that IIS does not recognize these files, add the following configuration in the Web. config file:
<system.webServer> <staticContent> <mimemap fileextension=". apk"Mimetype="application/vnd.android.package-archive"/> <mimemap fileextension=". Properties"Mimetype="text/x-java-properties"/> <mimemap fileextension=". Bcmap"Mimetype="Image/svg+xml"/> </staticContent> </system.webServer>
Running the chrome console again without prompting for errors, Chinese can also be displayed correctly.
Pdf.js Configuring use notes in IIS