0

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?

7
  • Are both browsers for the environments set to the same default font size? In general, it's left to the individual user to set their own printing preference settings - which makes a mess for us programmers. Commented Mar 25, 2011 at 19:10
  • Yes, even using my own browser. I can print one set from my environment and then call up the same page on the test environment and print and get print outs with much larger fonts. On the screen they look the same its just on the papaer that it looks so different. Commented Mar 25, 2011 at 19:12
  • Are normal web pages doing this strange larger-font-size problem in your test environment? How about other coldfusion pages? Commented Mar 25, 2011 at 19:14
  • other pages seem off too but not as dramatic Commented Mar 25, 2011 at 19:45
  • is there a stylesheet linked using the print media type on the test environment that has different font settings then your dev environment? Commented Mar 25, 2011 at 21:02

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.