[xhtml2pdf] Report not page breaking

2,058 views
Skip to first unread message

geraldcor

unread,
May 12, 2010, 7:57:50 PM5/12/10
to Pisa XHTML2PDF Support
I'm sorry, but here is another question.

I have a report that can be quite large or it can be small. Here is
my @page {} definition:

@page {
size: letter;
margin: .25in;
@frame header {
top: 0in;
height: 1.25in;
width: 8.25in;
margin: .25in;
-pdf-frame-content: logo;
}
@frame left {
top: 1.25in;
left: .25in;
height: 1.25in;
width: 3.75in;
margin: 0in;
-pdf-frame-content: leftcol;
}
@frame right {
top: 1.25in;
right: .25in;
height: 1.25in;
width: 3.75in;
margin: 0in;
-pdf-frame-content: rightcol;
}
@frame mains {
top: 2.5in;
width: 8.25in;
margin: .25in;
height: 7in;
}
}

I am using a table to display the resultant data and the report looks
great when I have < 5 records, but when it goes beyond that I don't
get any page breaks. I though page breaks were just supposed to
happen. I've tried creating multiple @page {} definitions with and
without template names. I've tried -pdf-page-break: after; I've tried
named templates but I just can't get a page break when my table grows
larger.

Thank you for any help.

Greg

--
Sie haben diese Nachricht erhalten, da Sie der Google Groups-Gruppe Pisa XHTML2PDF Support beigetreten sind.
Wenn Sie Nachrichten in dieser Gruppe posten möchten, senden Sie eine E-Mail an xhtm...@googlegroups.com.
Wenn Sie aus dieser Gruppe austreten möchten, senden Sie eine E-Mail an xhtml2pdf+...@googlegroups.com.
Besuchen Sie die Gruppe unter http://groups.google.com/group/xhtml2pdf?hl=de, um weitere Optionen zu erhalten.

David Bolton

unread,
May 12, 2010, 11:23:42 PM5/12/10
to xhtm...@googlegroups.com
Gerald,

Take a look at past discussions on this list about page breaks and
tables such as the following:
http://groups.google.com/group/xhtml2pdf/browse_thread/thread/4659498d2d586203/dd2eb21f4dc62d00?lnk=gst&q=break+table#dd2eb21f4dc62d00

David

geraldcor

unread,
May 13, 2010, 12:40:56 AM5/13/10
to Pisa XHTML2PDF Support
I have poured over the various discussions and have only found
information on forcing explicit page breaks after certain points in
your html. I don't know when the page will need to break as I have the
potential of having 2 rows or 50 rows in my table which could span 1-5
pages. I am having problems with my table spanning multiple pages. It
just wraps from my last @frame to the first @frame I have defined. I
am thoroughly confused with the documentation on the proper way to use
@page for multiple pages if I don't want to specify a new template for
the next page explicitly. Also, I do have -pdf-frame-content specified
to have headers on every page if this makes a difference.

Thanks for the suggestion though. It is helpful to search both page
break and pagebreak.

On May 12, 9:23 pm, David Bolton <davidkbol...@gmail.com> wrote:
> Gerald,
>
> Take a look at past discussions on this list about page breaks and
> tables such as the following:http://groups.google.com/group/xhtml2pdf/browse_thread/thread/4659498...
> Besuchen Sie die Gruppe unterhttp://groups.google.com/group/xhtml2pdf?hl=de, um weitere Optionen zu erhalten.

David Bolton

unread,
May 13, 2010, 12:56:07 AM5/13/10
to xhtm...@googlegroups.com
Gerald,

My understanding (from memory) over the past couple years of following
this list is that pisa does not handle tables properly if they span more
than one page. My guess is a couple workaround (depending on your
content) are to split the content into multiple tables or use explicit
page breaks (as you mentioned in your previous email). I am not a pisa
developer and have not used tables with pisa so I don't know any more
than that.

David

Greg Corey

unread,
May 13, 2010, 11:28:32 AM5/13/10
to xhtm...@googlegroups.com
Ok. Here is what I did for future reference. As a table really is the best layout for this report, I have done the following:

<table class="confirmtable" repeat="1">
<tr>
<th class="idflnum">IDFL#<br />CIQ/CH#</th>
<th class="type">Type</th>
<th class="rush">RUSH</th>
<th class="complete">Estimated Completion</th>
<th class="represent">Sample Representing</th>
<th class="label">Label</th>
</tr>
{% for c in confirm_data %}
{% ifequal forloop.counter0 5 %}
</table>
<div><pdf:nextpage /></div>
<table class="confirmtable" repeat="1">
<tr>
<th class="idflnum">IDFL#<br />CIQ/CH#</th>
<th class="type">Type</th>
<th class="rush">RUSH</th>
<th class="complete">Estimated Completion</th>
<th class="represent">Sample Representing</th>
<th class="label">Label</th>
</tr>
{% endifequal %}
<tr>
[...]
</tr>
{% endfor %}
</table>

This works. I'm happy. Still don't know the use of repeat="1" if the table won't go to 2 pages but that doesn't matter now. This works really well. Thanks for the pushes in the right direction.

Greg
Reply all
Reply to author
Forward
0 new messages