计算将使用Javascript window.print打印的页数 [英] Calculate number of pages which will print using Javascript window.print

查看:1508
本文介绍了计算将使用Javascript window.print打印的页数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户端要求显示使用js的window.print方法打印自定义页面。
主要问题是

My Client requirement is to show to make a customized page print using window.print method of js. major Issues are

当动态填充内容时,如何检查创建字母大小页面的页数?

How I can check how many pages are creating of letter size page when content is populated dynamically?

如果内容在页面末尾处理,则可能会自动将内容传输到下一页。现在可以根据填写的条目数量动态填充数据来检查内容是否会在页面末尾切断?

If content is choping at the end of page it may automatically transfer content to next page. Now is it possible to check whether content will chop or not at the end of page when data in populated dynamically depending upon number of entries filled?

推荐答案

很遗憾,您无法计算要打印的页数,但您可以使用分页符强制内容到新页面。

Unfortunately you can't calculate the number of pages that are going to be printed, but you can force content to a new page using page breaks.

这篇关于计算将使用Javascript window.print打印的页数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆