I've hit a weird snag developing a reports using ColdFuions 8. The report prints a number of large HTML tables and the customer wants them to be formated ins such a way that when they are printed out the user will get 2 of the tables per page.
So it wasn't hard to make a开发者_高级运维 page break by using a
<p style="page-break-before: always"></p>
However, while I got the desired effect while using the development ColdFusion environment on my laptop, I get a diffent effect when printing reports generated on the test web server. There the reports print out with a much larger font so that the second table spills over onto a second page.
Has anyone else experienced this or has a recomendation for how to try and tackle it?
When a report needs to be printed, I would recommend using CFDOCUMENT to create a PDF. You get much more control over the final output including changing page orientation which is great for tables that are wide. It honors a lot of HTML and CSS including the page-break-before style so you shouldn't have to do to much conversion to use it outside of wrapping the report area with CFDOCUMENT
tags. It has been available since CF7 so it should work for you on CF8.
精彩评论