The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Generating PDFs for Fun and Profit with Flying Saucer and iText
Subject:  HUGE pitfall!!!
Date:  2007-09-06 18:06:22
From:  tietyt


It took me 2 hours for me to figure this out so I thought I'd post it. If you want to try out page numbering, make sure you remove this from the top of your xhtml file (which happens to appear at the top of the first example):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

If you leave that in there, you'll keep getting exceptions that say stuff like:
ERROR: 'NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.'

This may be obvious to someone that knows xhtml, I just know html.

 Feed java.net RSS Feeds