Pdf.js Configuring usage notes in IIS

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.