ASP. NET for online printing, jquery print plugin PrintArea for automatic paging

Source: Internet
Author: User

Components used: jquery Print plugin PrintArea, interested can be studied.

Use the method to skip over, here will explain how to implement printing multi-page is can be paged.

Now there are two ways to think:

1, according to the specific printer model and the type of paper used, and then use JS to calculate how high each page, according to the height of each piece of paper to carry out the appropriate increase or decrease height. (This way the disadvantage is only for the single-type paper, the calculation is very cumbersome, to a lot of addition and subtraction-_-);).

Refer to Page A4 paper height: http://www.jb51.net/office/word/67360.html

2, in the above a way of thinking, try to find can automatically calculate height and pagination, the results found a CSS properties: Page-break-after, incredibly a CSS can be done (no shortcomings, suitable for a variety of paper, automatic calculation, do not need to complicate JS plus subtraction).

Here's a specific explanation for this CSS: http://www.w3school.com.cn/cssref/pr_print_page-break-after.asp

Interested or will realize this function can go to study, hope to bring help to everyone, less detours.

ASP. NET for online printing, jquery print plugin PrintArea for automatic paging

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.