Вопрос

I have this page with multiple records I want to print.

The problem is that I get a blank page at the end.

My CSS:

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

My html/php:

...
</table>
  <p class="break">&nbsp;</p>
    <?php } while ($row_RSacessorios = mysql_fetch_assoc($RSacessorios)); ?>
</body>
</html>
<?php
mysql_free_result($RSacessorios);
mysql_free_result($RSfases);
?>
Это было полезно?

Решение

I found a simple solution. I just remove the class "break" on the last record.

if ($count < $total_rec) {
  <p class="break">&nbsp;</p>
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top