RM1X wrote:
> public void onStartPage(PdfWriter writer, Document document){
// why are you using onStartPage?
> PdfContentByte cb = writer.getDirectContent();
// why aren't you using getDirectContentUnder();
> cb.beginLayer(not_printed);
> cb.addTemplate(paper, 0, 0);
> cb.endLayer();
> }
> How do I specify that the objects that I add to the document, should be
> at the very top, and not behind what was previously stamped on the page?
Please read the documentation: the difference between getDirectContent()
and getDirectContentUnder() is explained on many different places.
http://itext.ugent.be/itext-in-action/figures/10_05.jpg
Also: if you'd read the documentation, you'd learn that it is not
advised to use onStartPage to add content; content should be added
in onEndPage, even if the content goes under the existing stuff.
br,
Bruno
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/