Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Forrest: User

Trouble Forcing Page Breaks in PDFs

 

 

Forrest user RSS feed   Index | Next | Previous | View Threaded


PenkroVS at westinghouse

Feb 28, 2007, 8:37 AM

Post #1 of 2 (128 views)
Permalink
Trouble Forcing Page Breaks in PDFs

I am attempting to force a page break in the PDF form of a site built with
forrest. Looking at the Apache Forrest FAQ site, I see the following hint:

To insert a page break in a PDF document simply add pageBreakBefore and/or
pageBreakAfter to the class attribute of the block you wish to force a page
break on. All the common block grouping elements support this class, for
example, note, warning, p and so on.

When I attempt to add this to my xml file using the following code:

</tr>
</table>
<p class="pageBreakAfter"></p>
</section>
&proprietaryClass2;

</body>
</document>

I get this error:

experts.xml:425:30: Attribute "class" must be declared for element type "p".

Do I need to add any special code to allow the <p> tag to take the attribute
"class"? Any thoughts on how I can get this to validate and build?

Any assistance would be appreciated!

Thanks!

Best Regards,
Vincent S. Penkrot


rgardler at apache

Feb 28, 2007, 12:07 PM

Post #2 of 2 (123 views)
Permalink
Re: Trouble Forcing Page Breaks in PDFs [In reply to]

Penkrot, Vincent S. wrote:
>
> * <p class="pageBreakAfter"></p>*

...

>
> I get this error:
>
> *experts.xml:425:30: Attribute "class" must be declared for element type
> "p".*
>
> Do I need to add any special code to allow the <p> tag to take the
> attribute "class"? Any thoughts on how I can get this to validate and
> build?

No, you don't need to do anything special, but you do need to be using
the right DTD, which in this case is XDoc 2.0.

You can see from http://forrest.apache.org/dtdx/document-v20.dtdx.html#p
that the class attribute is supported on the p element. This is the DTD
used in the majority of our samples, so just cut and paste the doctype
from one of the samples.

Ross

Forrest user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.