I figured out the problem Using a Phrase to create the HeaderFooter (instead
of a Paragraph object) solved the problem.
Change this line:
HeaderFooter header = new HeaderFooter(new Paragraph(headString,
iTextHeadingFont), true);
To this:
HeaderFooter header = new HeaderFooter(new
I am creating a header with iText using the HeaderFooter object. The Page
Number is always appearing on the second line of the header, even though
there is plenty of room on the first line, and I am not explicitly putting a
line break there. It seems that this problem only started when upgrading
Your solution will work until you attempt another modification. HeaderFooter
has been retired and is now deprecated. Use page events instead. The book
and the online docs have examples.
---mr. bean
re
tamtam18 wrote:
I figured out the problem Using a Phrase to create the HeaderFooter
It appears that every generic object is being deprecated. The files I am
working with are sometimes printing to PDF, sometimes to RTF. I am under
the impression that page events are only for PDF files. Is the new idea
going to be to code everything completely separately for PDF and RTF files?
tamtam18 wrote:
Why is it not a good idea to keep supporting things like Table, Cell,
HeaderFooter, etc. that work for both PDF and RTF
Because there's too much difference between the file specifications of
PDF and RTF. Also both document formats have goals that are very different.
--
This