Thanks Paulo. Now I have the smaller pdf of the world !!! :-) Best regards Ale.
Paulo Soares-3 wrote: > > If you only call PdfReader once the same template will be included and > there will be no object repetition. > > Paulo > > ________________________________________ > From: Zucchi Alessandro [EMAIL PROTECTED] > Sent: Thursday, November 13, 2008 9:46 AM > To: [email protected] > Subject: [iText-questions] Use template to reduce space > > Hi all, > > I've to generate a file PDF based on a pdf models (generated previously by > distiller, 1 page) and fill this model many times for different user data. > At the moment, the generated file is very big because the models get added > for each user. > Model aren't based on fields due to the process of its generation. > > Follow the merge process (data on model) > - Load the model in this way: > PdfReader reader = new PdfReader(m_modelPath + curModel); > PdfContentByte cb = writer.getDirectContent(); > PdfImportedPage impPage = writer.getImportedPage(reader, 1); > cb.addTemplate(impPage, 0, 0); > - Set needed font and write the text (specific for one user) over the > model > using cb.showTextAligned(...) ... and so on for all user data loading > always the same model. > > Model size is 50Kb~ against 1k of textual data. > > My aim is to embed only one time the model and link different textual data > to the previous model. > Is possible with iText ? > > Best regards > Ale. > > Aviso Legal: > > Esta mensagem é destinada exclusivamente ao destinatário. Pode conter > informação confidencial ou legalmente protegida. A incorrecta transmissão > desta mensagem não significa a perca de confidencialidade. Se esta > mensagem for recebida por engano, por favor envie-a de volta para o > remetente e apague-a do seu sistema de imediato. É proibido a qualquer > pessoa que não o destinatário de usar, revelar ou distribuir qualquer > parte desta mensagem. > > > > Disclaimer: > > This message is destined exclusively to the intended receiver. It may > contain confidential or legally protected information. The incorrect > transmission of this message does not mean the loss of its > confidentiality. If this message is received by mistake, please send it > back to the sender and delete it from your system immediately. It is > forbidden to any person who is not the intended receiver to use, > distribute or copy any part of this message. > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > -- View this message in context: http://www.nabble.com/Use-template-to-reduce-space-tp20477612p20481034.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
