sdglhm / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Have a blank last page #369

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using dompdf with drupal
2. I add a page-break via css - that s working
3.

What is the expected output? What do you see instead?
It seems that the last node after the page-break is a bit to long. In order to 
that dompdf adds a page-break by it self. This page is blank. Is it possible to 
delete blank pages - means no content on it?
Is it possible to avoid automatic page breaks?

What version of the product are you using? On what operating system?
vers. 0.6 beta2

Please provide any additional information below.

Original issue reported on code.google.com by rob.mobi...@gmail.com on 19 Oct 2011 at 9:37

GoogleCodeExporter commented 9 years ago
There's not really any way to prevent page breaks. Your best bet is to clean up 
the HTML so you don't have any empty elements at the end.

If you can't clean up your HTML you could try surrounding your content with a 
div that has a set height and overflow set to hidden. It would help to provide 
a more relevant solution if we could see the source HTML document.

Original comment by eclecticgeek on 20 Oct 2011 at 3:53

GoogleCodeExporter commented 9 years ago
thanks for that hint.
What about JS - it seems if I try to add a class via jquery, the class isn't 
added at the right time - added to late!.
I tried inline js without success. Would it be possible to set a "delay" on the 
pdf creation, to wait until the jquery stuff is added?
<script type="text/javascript">  
$(document).ready(function(){
$('.print_node').addClass('red');
})
</script>

Original comment by rob.mobi...@gmail.com on 2 Nov 2011 at 11:30

GoogleCodeExporter commented 9 years ago
Dompdf does not support execution of JavaScript such as jQuery or even any 
other common JavaScript framework.
What would you like to do ?

PDF documents can embed JS code, but it cannot be used to change the document's 
style like you would like to as it does not support the same APIs as the 
JavaScript engine that is in internet browsers.

For more info : http://www.adobe.com/devnet/acrobat/javascript.html

Original comment by fabien.menager on 2 Nov 2011 at 12:17

GoogleCodeExporter commented 9 years ago
Hi fabien, 
I have a few pages, that should merge to a pdf. Now I try to manage the 
page-break. If I "hard-code" the page break class into the html the page break 
is working, but how avoid the page break on the last "views-row".
This views rows are a list from drupal views . Now I try to set /remove the 
page-break class via jquery to avoid the page-break on last page...

Original comment by rob.mobi...@gmail.com on 3 Nov 2011 at 9:32

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16