On May 26, 2010, at 9:38 PM, 1T3XT info wrote: > Why would you want to create a PdfTemplate without a writer? > That's like creating a single page PDF.
I am actually creating a single page PDF, by arranging 2 existing PDF files in a pattern on the page. (4 alternating rows of PDF A, PDF B, PDF A, PDF B.) Each PDF file may have an embedded AcroForm and I am filling that form programmatically. See my original question here: http://thread.gmane.org/gmane.comp.java.lib.itext.general/51365 I had a single huge method generating these PDFs and it was working fine. However, I decided to refactor the 200+ line function into multiple functions, and now I've hit a compile error in my (refactored) method that should return a PdfTemplate, because it requires a PdfWriter. > Creating a single page PDF from an existing PDF is possible using > iText, > but it has some serious downsides in comparison with using > PdfTemplate + > a writer (bad resources management is the major downside). > > You should know more about PDF before I can give a better answer. > Honestly: this is a pointless discussion. > It's like asking "why is the sky blue?" without knowing anything about > the breaking index of light that shines to a medium. In a sense, I am coming here asking questions about iText, to which you are saying, I need to know more about iText first. No kidding. The problem is not with what I am asking, but rather, with how you are answering it. Instead of trying to understand what I am doing or what I need, you have quickly fired off some kind of insulting comment. The only other time I asked a question to this list, you scoffed at it, told me it was impossible, and left it to another user to not only explain to me how what I wanted *was* possible, but even gave me example code showing me how to do it. The reason I am using a PdfTemplate object is because that's what I need for the aforementioned solution I got via this mailing list. Which was successful, until I refactored, my program and discovered this object dependency between PdfTemplate and PdfWriter. In conclusion, I'm not sure who you are, but if you represent the iText project, you come across in a really condescending manner, and you should reconsider the way you answer questions. P.S. If a 10-year old asked me "why is the sky blue?" my first response wouldn't be to mock their ignorance of light scattering. -- Thomas Hauk Shaggy Frog Software www.shaggyfrog.com ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/