开发者

Printing web pages in an order

I've a php file whic开发者_C百科h'll run a SQL script and fetch information about users.

Some user's information may span 2 or 3 pages while some might end in just 1.

I want to print the beginning of ever user's report in a new page. All these process has to be automated because there are some 400 users, and the client can't select page layout for every user or print them individually.

How can i achieve this? using PHP or Javascript? Is there any library to do this?

Thanks :)


Your question was a little confusing, but now I think you're talking about doing page breaks in a print.css? If so you can use: page-break-before and page-break-after in your CSS.

So using CSS you would do something like:

div.pagecontainer { page-break-after:always; }

Where your page was contained in:

<div class="pagecontainer">page content here</div>

If you're just trying to figure out pagination. Take a look at this php solution.

You can also do completely client side pagination as mentioned in this question and this question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜