On 1/4/11 4:01 AM, 1T3XT BVBA wrote: > Op 4/01/2011 6:18, Dave Shevett schreef: >> 1) I create PdfContentByte 'cb' on a Document > This is not consistent with the way I interpret your requirement. > I assumed that you were talking about an EXISTING FORM. > Now I see that you create PdfContentByte on a Document object. > This is strange for two reasons: > - Document is only used when you create a PDF from scratch;
I am creating a PDF from scratch - the image is the resulting badge, which is sent to the printer. > - if you create a PDF from scratch, you get a PdfContentByte from a > PdfWriter object, not from a Document object. I do this - the full code of the print routine is now here: http://pastebin.stonekeep.com/11528 >> 2) Using lines like this, I place 'badge rows' (br) where i want them: > I don't understand why you are using this approach. > Why aren't you using a real interactive form? This is an automated print routine for convention badges. It is being run in the background as a "format and print" routine coming from database data. > Why are you using cb.showTextAligned(), it's easier to use > ct.showTextAligned(). Can ct.showTextAligned do absolute positioning? >> If this code executes, all OTHER fields on the document disappear, and I >> end up with just a few characters of the field, with the X through it, >> and nothing else on the document. >> >> What am I doing wrong? > Hard to tell: you only provide part of the code, NOT the code that matters. > Please write a small example that we can run in standalone mode. > Also show us the original PDF: is it a form? > You are using PdfStamper, aren't you? If not: please read the documentation. I'm not using pdfstamper because I'm creating the entire document programmatically from scratch. Thanks again! -d ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php