• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 430
  • Last Modified:

page break keeps printing blank page

Hi all,

I have a web page that goes through a loop and prints a job card to the web page, then the client clicks the print button to print the job card for the resources.

After every job card I have <p style="page-break-after: always"> to insert a page-break so they all print on a seperate pages.  

This works great until the last page where it then prints out a blank page.
As the client prints out around 100 single job cards and 25 batched job cards a day the client will have approx 125 a day (over 3000 a month) blank pages.

can anyone please help on how I can prevent the last page from printing.



James Glen
James Glen
  • 3
  • 2
1 Solution
what if you set it to auto ?

<p style="page-break-after: auto">
James GlenIT EngineerAuthor Commented:
I tried this as I thought that would resolve it but I still got the blank page printed at the end.
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

James GlenIT EngineerAuthor Commented:
This is what I have done.

I have put the Page break after the </table> but as it is in loop it puts one after every </table> even the last one of which i dont want it to do.
can you show me the code?
why dont you do a loop through the records then if the current record is the last one do not insert pagebreak


i = 1

do while not rs.eof
'do your stuff

if i < rs.recordcount then
response.write "<p style=""page-break-after: always"">"
end if


Hope this helps, untested but looks ok
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now