Reduce the IO load of reporting application server with jspdf effectively

Source: Internet
Author: User

1. Using Jspdf to generate PDF documents on the client browser

The use of this method can effectively alleviate the pressure on the server, but for internationalization, this library is still the problem: the library does not support Unicode, the generation of Chinese documents will be garbled, the official also describes the problem, for details, see: HTTPS://GITHUB.COM/MRRIO/JSPDF/ISSUES/12.

2. Solve the Chinese problem.

Use canvas drawing to draw Chinese into a picture, then use Jspdf to combine text and pictures to generate PDFs.

You can use the following JavaScript libraries to generate documents:

1. Https://github.com/kangax/fabric.js

2. Https://github.com/niklasvh/html2canvas

3. Example:

Reduce the IO load of reporting application server with jspdf effectively

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.