>I'd use a space character, calculate its width, then use >setHorizontalScaling() to scale the width to the desired amount. > >Depending on what you want to do, it might be interesting to use TAB >Chunks instead.
That worked ! Thanks for the tip. Btw, I tried using tab chunks, but I found it to be too complicated. I am using a ColumnText object to write out a line at a time. With a tab Chunk it requires that the exact x position of where text should be written next. This is better for text aligned on specified tabs. -----Original Message----- From: itext-questions-requ...@lists.sourceforge.net [mailto:itext-questions-requ...@lists.sourceforge.net] Sent: Friday, September 11, 2009 8:32 AM To: itext-questions@lists.sourceforge.net Subject: iText-questions Digest, Vol 40, Issue 31 Send iText-questions mailing list submissions to itext-questions@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/itext-questions or, via email, send a message with subject or body 'help' to itext-questions-requ...@lists.sourceforge.net You can reach the person managing the list at itext-questions-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of iText-questions digest..." Today's Topics: 1. Re: How to add precise amounts of whitespace to a Phrase object ? (1T3XT info) 2. (no subject) (Michael Harig) 3. Re: (no subject) (1T3XT info) 4. Re: Anchor problem, generates strange reference (G_M) 5. Re: Anchor problem, generates strange reference (1T3XT info) 6. Re: iText-questions Digest, Vol 40, Issue 14 (1T3XT info) 7. PDF Bytes after Merge (SUNDARAKSHI) 8. Re: PDF Bytes after Merge (1T3XT info) 9. RTF to PDF (donanik duck) ---------------------------------------------------------------------- Message: 1 Date: Fri, 11 Sep 2009 08:01:58 +0200 From: 1T3XT info <i...@1t3xt.info> Subject: Re: [iText-questions] How to add precise amounts of whitespace to a Phrase object ? To: Post all your questions about iText here <itext-questions@lists.sourceforge.net> Message-ID: <4aa9e7d6.8080...@1t3xt.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Adam Mork wrote: > I need to be able to add precise amounts of white space to a phrase. Is > there a way to make a chunk with a specific amount of whitespace, the > amount would be the width of the whitespace. ? I'd use a space character, calculate its width, then use setHorizontalScaling() to scale the width to the desired amount. Depending on what you want to do, it might be interesting to use TAB Chunks instead. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------ Message: 2 Date: Fri, 11 Sep 2009 12:05:02 +0200 From: "Michael Harig" <m.ha...@gmx.de> Subject: [iText-questions] (no subject) To: itext-questions@lists.sourceforge.net Message-ID: <20090911100502.11...@gmx.net> Content-Type: text/plain; charset="iso-8859-1" Hi. I'm trying to use PDF files as templates for (simple) reports (using PdfStamper). I run into 2 problems: 1. To combine exact position of a table (using writeSelectedRows) and automatic page break I need to know the bottom and top total margin (page margin + footer/header). I found in PdfDocument the methods indentBottom() and indentTop(). They seem to return the values I need, but they are protected methods. I did want to customize the sources but there are several errors in iText-2.1.7-sources.jar, most but not all related to missing BouncyCastle classes (unfortunately that website is down atm). 2. Furthermore, When "growing" a table all items below that (except footer) have to be moved. I couldn't figure out how to achieve this. Anyone with suggestions, please? Regards, Michael -- Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate f?r nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 ------------------------------ Message: 3 Date: Fri, 11 Sep 2009 12:21:04 +0200 From: 1T3XT info <i...@1t3xt.info> Subject: Re: [iText-questions] (no subject) To: Post all your questions about iText here <itext-questions@lists.sourceforge.net> Message-ID: <4aaa2490.2000...@1t3xt.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Michael Harig wrote: > Hi. > > I'm trying to use PDF files as templates for (simple) reports (using > PdfStamper). I run into 2 problems: You are using PdfStamper, but you are talking about > 1. need to know the bottom and top total margin (page margin + footer/header). But getting the bottom and top margins of EXISTING documents is IMPOSSIBLE! > I found in PdfDocument the methods indentBottom() and indentTop(). DON'T EVER LOOK INSIDE PdfDocument!!! > They seem to return the values I need, but they are protected methods. > I did want to customize the sources If you need the margins of a Document, use the methods available in the Document class. DON'T EVER LOOK INSIDE PdfDocument!!! > but there are several errors in iText-2.1.7-sources.jar, > most but not all related to missing BouncyCastle classes > (unfortunately that website is down atm). You can download the necessary BC jars from: http://itext.svn.sourceforge.net/viewvc/itext/trunk/lib/ > 2. Furthermore, When "growing" a table all items below that > (except footer) have to be moved. I couldn't figure out how to achieve this. It is IMPOSSIBLE to "reflow" content on an existing PDF document. > Anyone with suggestions, please? Your design is flawed based on wrong assumptions about PDF. I suggest that you catch up with some reading about PDF first. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------ Message: 4 Date: Fri, 11 Sep 2009 03:25:16 -0700 (PDT) From: G_M <gmar...@indra.es> Subject: Re: [iText-questions] Anchor problem, generates strange reference To: itext-questions@lists.sourceforge.net Message-ID: <25398553.p...@talk.nabble.com> Content-Type: text/plain; charset=us-ascii It doesn't work. What I'm trying to understand is why adobe reader puts a word at the end of the link??? even when watching the contents it shows the link with the correct URL. 1T3XT info wrote: > > G_M wrote: >> It works but can I do something in Java? it's because it's a pdf sended >> via >> email and thus I can't tell the clients to do this, I think it's >> understandable. > > Avoid using http:// > Whenever Adobe Reader sees this, it wants to convert it to a link > (unless you change the preferences). > -- > This answer is provided by 1T3XT BVBA > http://www.1t3xt.com/ - http://www.1t3xt.info > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > 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/ > > -- View this message in context: http://www.nabble.com/Anchor-problem%2C-generates-strange-reference-tp25381441p25398553.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------ Message: 5 Date: Fri, 11 Sep 2009 13:09:34 +0200 From: 1T3XT info <i...@1t3xt.info> Subject: Re: [iText-questions] Anchor problem, generates strange reference To: Post all your questions about iText here <itext-questions@lists.sourceforge.net> Message-ID: <4aaa2fee.5000...@1t3xt.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed G_M wrote: > It doesn't work. > What I'm trying to understand is why adobe reader puts a word at the end of > the link??? even when watching the contents it shows the link with the > correct URL. You've just established that the problem isn't caused by iText. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------ Message: 6 Date: Fri, 11 Sep 2009 13:13:08 +0200 From: 1T3XT info <i...@1t3xt.info> Subject: Re: [iText-questions] iText-questions Digest, Vol 40, Issue 14 To: Post all your questions about iText here <itext-questions@lists.sourceforge.net> Message-ID: <4aaa30c4.1070...@1t3xt.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Art Purcell wrote: > Here is the html code causing the problem. The problem is with the style > attribute of the <div> element. > > <HTML> > <HEAD> > </HEAD> > <BODY > > <DIV style="FONT-SIZE: large">Hot Internship Opportunities</DIV> > </BODY> > </HTML> > > I can't control the content of the html data. If the iText parser cannot > handle some constructs, that's ok, if I can render the other components > of the data-set and attach the html as a file. > > In this case, the exception occurs when I call Document.close() which > cancels the whole data set. > > Any help and/or suggestions you can offer will be appreciated. Font-Size: large is probably not supported in iText (I should check). It probably causes a font of size 0, and that's a problem. You can solve this problem by adapting HTMLWorker (I'll probably look into that soon) or by using a different parseToList method (the one that takes a HashMap of providers; provide your own FontFactoryImp to catch fonts with size zero). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------ Message: 7 Date: Fri, 11 Sep 2009 04:33:46 -0700 (PDT) From: SUNDARAKSHI <soshanmu...@inautix.co.in> Subject: [iText-questions] PDF Bytes after Merge To: itext-questions@lists.sourceforge.net Message-ID: <25399336.p...@talk.nabble.com> Content-Type: text/plain; charset=us-ascii Hi I am Using the following code to merge the PDF. But the code saves the PDF file in the physical harddisk. I need after pdf merge it should return as PDFbytes. i need to merged PDF as bytes. Please help me Thanks in advance. public void mergePDF(ArrayList arrayList,String OutFileName) throws Exception { PdfReader reader; PdfCopyFields copy = new PdfCopyFields(new FileOutputStream(OutFileName)); Object[] elements = arrayList.toArray(); for(int i=0;i<elements.length;i++) { reader = new PdfReader(elements[i].toString()); copy.addDocument(reader); } copy.close(); } -- View this message in context: http://www.nabble.com/PDF-Bytes-after-Merge-tp25399336p25399336.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------ Message: 8 Date: Fri, 11 Sep 2009 13:47:13 +0200 From: 1T3XT info <i...@1t3xt.info> Subject: Re: [iText-questions] PDF Bytes after Merge To: Post all your questions about iText here <itext-questions@lists.sourceforge.net> Message-ID: <4aaa38c1.1050...@1t3xt.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed SUNDARAKSHI wrote: > Hi > > I am Using the following code to merge the PDF. But the code saves the > PDF file in the physical harddisk. I need after pdf merge it should return > as PDFbytes. > i need to merged PDF as bytes. > > Please help me I've visited www.inautix.co.in and found out that it's one of India's 25 best companies to work for. You can help us help you by asking this magnificent employer to buy you a copy of "iText in Action". You'll find the answer on pages 36, 69-70, and probably many other places in the book ;-) -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------ Message: 9 Date: Fri, 11 Sep 2009 07:32:08 -0700 (PDT) From: donanik duck <nald...@yahoo.com> Subject: [iText-questions] RTF to PDF To: iText-questions@lists.sourceforge.net Message-ID: <831292.35672...@web65709.mail.ac4.yahoo.com> Content-Type: text/plain; charset="us-ascii" Hi everyone, I have a simple question. Can I convert RTF or DOC files to PDF using iText? My complete need is to combine many RTF (or DOC. either is fine) documents to one single document and then transform the result (the one RTF or DOC file) to PDF. I had a hard time trying to parse the DOC format so I tried to see if I can easily do the merge having many PDF files. This worked fine so my only problem now is to transform the RTF or DOC files to PDF so I can do the merge using iText. Can iText help me with that? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ------------------------------ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions End of iText-questions Digest, Vol 40, Issue 31 *********************************************** ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/