Re: [iText-questions] MultiColumnText and overflow
On 18/08/2011 20:27, Leo wrote: What do you think about it? I wasn't aware MultiColumnText was still shipped with iText. The class wasn't mentioned in the Second Edition of the book, and it's eligible for removal. I'll put your suggestion on the development whiteboard, but I think the lines you've removed are there for a reason. Unfortunately, I don't remember why ;-) We'll take a look at it. -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. 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
[iText-questions] MultiColumnText and overflow
Hi everybody, I need to specify the height of a MultiColumnText, doing this with the specific constructor, when the text to write exceeds page margin, it goes lost! Why?!? I'd suggest to change MultiColumnText behavior simply disabling some lines. I'm sending the MultiColumnText class changed and a class for testing, working! Possibly, the overflow could be decided by user adding a setOverflow method and relative handling. So I can be able to choose whenever stop writing or simply starting a new page. What do you think about it? Leo } else { // check if we are done because of height totalHeight += currentHeight; // comments by Leonardo Padula // if (desiredHeight != AUTOMATIC totalHeight = desiredHeight) { // overflow = true; // break; // } else { // need to start new page and reset the columns documentY = nextY; newPage(); currentHeight = 0; // } } TestMultiColumnTest.java Description: Binary data MultiColumnText.java Description: Binary data TestMultiColumnTest.pdf Description: Adobe PDF document -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. 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
Re: [iText-questions] MultiColumnText and TOC
This probably means I have to do multicolumn manually... That is the better option. Ok, so I've switched to ColumnText, but Chapters still aren't allowed. I'm going to attempt Chunk with anchors, but kind of amazes me that I cannot use chapters in columns. I'd assume that layout would have no influence on the sematics of the content. java.lang.IllegalArgumentException: Element not allowed. at com.itextpdf.text.pdf.ColumnText.addElement(ColumnText.java:452) Curious if I'll be able to find out on what page a anchor is at for the TOC. Tom -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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
Re: [iText-questions] MultiColumnText and TOC
On 2/11/2010 10:29, Tom wrote: This probably means I have to do multicolumn manually... That is the better option. Ok, so I've switched to ColumnText, but Chapters still aren't allowed. No, if you need the bookmarks, you need to use PdfOutline. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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
[iText-questions] MultiColumnText and TOC
I'm hacking along nicely in my attempt to get a paper-style layout. Such a multi column layout still has articles (titles and bodies) and it is not illogical to want to build a TOC for these articles. No need to number them, but on which article can be found on what page would be nice. The MultiColumnText object does not support chapters nor anchors. Is there any reason why? Are chapters or anchors for some reason I cannot foresee unusable in a multi column layout? This probably means I have to do multicolumn manually... Or extend the MultiColumnText to support chapters and / or anchors. Or is there another way to get TOC information from a MCT? Tom -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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
Re: [iText-questions] MultiColumnText and TOC
On 30/10/2010 12:57, Tom wrote: The MultiColumnText object does not support chapters nor anchors. I think Chunk.setAnchor is supported. So are generic tag events. This probably means I have to do multicolumn manually... That is the better option. Although MultiColumnText isn't marked as deprecated, it will probably be in the near future. MultiColumnText is no longer mentioned in the second edition of iText in Action in favor of ColumnText. The benefits of MultiColumnText don't outweigh the difficulties to support that class. Some known issues with MultiColumnText just can't be fixed. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ 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
Re: [iText-questions] MultiColumnText alignment problems
Hi Can you please submit your code. So that I can I have look into it. Alok -- View this message in context: http://itext-general.2136553.n4.nabble.com/MultiColumnText-alignment-problems-tp2154397p2287188.html Sent from the iText - General mailing list archive at Nabble.com. -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ 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/
Re: [iText-questions] MultiColumnText alignment problems
aloksurati wrote: Hi Can you please submit your code. So that I can I have look into it. You are responding to a mail correspondence dating from 2007. Are you sure this isn't a mistake? What is your question? -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ 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/
Re: [iText-questions] MultiColumnText height
Ovidiu Lazar wrote: Anyone? Why do you use MultiColumnText if you can as well use ColumnText and get more functionality? -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ 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/
Re: [iText-questions] MultiColumnText height
I have looked over it but I couldn't find anything related to what I'm looking for... has anyone tried adding elements after some multicolumn text? Best regards, Ovidiu Lazar Evozon Systems 1T3XT info wrote: Ovidiu Lazar wrote: Anyone? Why do you use MultiColumnText if you can as well use ColumnText and get more functionality? -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ 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/
Re: [iText-questions] MultiColumnText height
Ovidiu Lazar wrote: has anyone tried adding elements after some multicolumn text? A better question would be: is anyone still using MultiColumnText? Maybe everybody uses ColumnText instead. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ 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/
Re: [iText-questions] MultiColumnText height
Indeed, it's a good question. I worked on an example and I managed to reproduce the same functionality. But I still can't get it to return the height of the last page so i know where to continue adding text.. Here's my code: int status = 0; int column = 0; while ((status ColumnText.NO_MORE_TEXT) == 0) { if (column == 0) { ct.SetColumns(left, right); column = 1; } else { ct.SetColumns(left2, right2); column = 0; } status = ct.Go(); ct.YLine = 790; ct.Alignment = Element.ALIGN_JUSTIFIED; status = ct.Go(); if ((column == 0) ((status ColumnText.NO_MORE_COLUMN) != 0)) doc.NewPage(); } doc.Add(new Phrase("this should be at the end on a sigle column this should be at the end on a sigle column this should be at the end on a sigle column this should be at the end on a sigle column ")); the last line above, doc.Add(new Phrase( appears at the beginning of the last page). Is there a way to know how much space the multicolumns have occupied on the page? I saw that the text column has a property LinesWritten but it's 0 at the end.. Any ideas? Best regards, Ovidiu Lazar Evozon Systems 1T3XT info wrote: Ovidiu Lazar wrote: has anyone tried adding elements after some multicolumn text? A better question would be: is anyone still using MultiColumnText? Maybe everybody uses ColumnText instead. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ 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/
Re: [iText-questions] MultiColumnText height
Ovidiu Lazar wrote: Is there a way to know how much space the multicolumns have occupied on the page? ct.getYLine(); -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ 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/
Re: [iText-questions] MultiColumnText height
Right, but that just returns 790, which is how much is set by default. But suppose the whole column is not filled, can I find out how much of it is occupied by text? Best regards, Ovidiu Lazar Evozon Systems 1T3XT info wrote: Ovidiu Lazar wrote: Is there a way to know how much space the multicolumns have occupied on the page? ct.getYLine(); -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ 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/
Re: [iText-questions] MultiColumnText height
Ovidiu Lazar wrote: Right, but that just returns 790, which is how much is set by default. But suppose the whole column is not filled, can I find out how much of it is occupied by text? I don't understand your question. If I run this example: http://1t3xt.info/examples/browse/?page=exampleid=120 The following information is written to the System.out: Lines written:9 Y-position: 806.0 - 644.0 Lines written:6 Y-position: 644.0 - 536.0 Lines written:11 Y-position: 536.0 - 338.0 Lines written:14 Y-position: 338.0 - 86.0 Lines written:2 Y-position: 86.0 - 50.0 This is one of the examples for the 1st edition of iText in Action, and it deals with getting control over what happens in ColumnText as described in the book. Are you saying that this example always returns the same Y and the same number of lines (zero)??? You are confusing me. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ 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/
Re: [iText-questions] MultiColumnText height
Hi, Appologies for the confusion. I am using a similar example to the one from your link. Also, I'm using itextsharp and a C# console application. The reason I got 790 was because my example was setting the YLine to be that much. I remove that statement and I got the following output for the folowing code: code: status = ct.Go(); Console.WriteLine(ct.YLine); output: 62 62 174 Press any key to continue . . . I'm not sure what those numbers mean, because the first two columns stretch over a whole page while the third one does not. Best regards, Ovidiu Lazar Evozon Systems 1T3XT info wrote: Ovidiu Lazar wrote: Right, but that just returns 790, which is how much is set by default. But suppose the whole column is not filled, can I find out how much of it is occupied by text? I don't understand your question. If I run this example: http://1t3xt.info/examples/browse/?page=exampleid=120 The following information is written to the System.out: Lines written:9 Y-position: 806.0 - 644.0 Lines written:6 Y-position: 644.0 - 536.0 Lines written:11 Y-position: 536.0 - 338.0 Lines written:14 Y-position: 338.0 - 86.0 Lines written:2 Y-position: 86.0 - 50.0 This is one of the examples for the 1st edition of iText in Action, and it deals with getting control over what happens in ColumnText as described in the book. Are you saying that this example always returns the same Y and the same number of lines (zero)??? You are confusing me. -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ 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/
Re: [iText-questions] MultiColumnText height
Ovidiu Lazar wrote: The reason I got 790 was because my example was setting the YLine to be that much. I remove that statement and I got the following output for the folowing code: code: /status = ct.Go(); Console.WriteLine(ct.YLine);/ output: 62 62 174 Press any key to continue . . . I'm not sure what those numbers mean, because the first two columns stretch over a whole page while the third one does not. Aha, thanks for clarifying. The numbers are Y coordinates. Y = 0 at the bottom of your page. 62 means you have a bottom margin of 62 pt which is nearly an inch. Indeed: if 174 is produced by your third column, it doesn't cover the whole page. This answers your question doesn't it? You can start writing other data at the coordinate Y = 174. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ 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/
Re: [iText-questions] MultiColumnText height
Anyone? Best regards, Ovidiu Lazar Evozon Systems Ovidiu Lazar wrote: Hi everyone, This is my first subscribtion to a mailing list, I'm trying to figure out how it works, so I'm posting my question as suggested in my welcome email :) The question is: I have a MultiColumnText which spans several pages. Typically, on the last page it does not fill all of it. SO, whe i try to output anything AFTER the MultiColumnText object, it starts from a new page. Is there a way I can continue writing immediately after the MultiColumnText is finished and avoid page breaks? Thanks -- Best regards, Ovidiu Lazar Evozon Systems -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ 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/ -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ 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/
[iText-questions] MultiColumnText height
Hi everyone, This is my first subscribtion to a mailing list, I'm trying to figure out how it works, so I'm posting my question as suggested in my welcome email :) The question is: I have a MultiColumnText which spans several pages. Typically, on the last page it does not fill all of it. SO, whe i try to output anything AFTER the MultiColumnText object, it starts from a new page. Is there a way I can continue writing immediately after the MultiColumnText is finished and avoid page breaks? Thanks -- Best regards, Ovidiu Lazar Evozon Systems -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ 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/
[iText-questions] MultiColumnText
Hello, I am trying to build a document containing more issues. But I have a problem with iText MultiColumnText. I want to add one MultiColumnText object more than once, but the MultiColumnText object is added only once. Here is a small sample code: Document document = new Document(); OutputStream out = new FileOutputStream(d:\\multicolumnsimple.pdf); PdfWriter.getInstance(document, out); document.open(); MultiColumnText mct1 = new MultiColumnText(100); MultiColumnText mct2 = new MultiColumnText(100); mct1.addRegularColumns(document.left(), document.right(), 10f, 3); mct2.addRegularColumns(document.left(), document.right(), 10f, 3); mct1.addElement(new Paragraph(nddjhu sguvbfhebg ruhugrbghrb bzubrgfzwrb ru rig bgrwgninru bvq gwubv rquiobgrbqgvhlbqberhbvrh br rpqbzerbvrqvuoqervhrbvrqeubvueb vq qbrqgibvzebvezrbvzruiqbvzoeivhuqer uerierlqbvrhbgrhqebvfrb urbqerbvqerbvuebvrjebvrqehjbverbv urqbqerbvgheqbvjrvuerqbvgbgfr eruq qrubgeuqbguqerbguqrpebgubr qe qerhguqebgqeubgubrqubg qu qughqguqbubqubg )); mct2.addElement(new Paragraph(nddjhu sguvbfhebg ruhugrbghrb bzubrgfzwrb ru rig bgrwgninru bvq gwubv rquiobgrbqgvhlbqberhbvrh br rpqbzerbvrqvuoqervhrbvrqeubvueb vq qbrqgibvzebvezrbvzruiqbvzoeivhuqer uerierlqbvrhbgrhqebvfrb urbqerbvqerbvuebvrjebvrqehjbverbv urqbqerbvgheqbvjrvuerqbvgbgfr eruq qrubgeuqbguqerbguqrpebgubr qe qerhguqebgqeubgubrqubg qu qughqguqbubqubg )); document.add(mct1); document.add(mct1); document.close(); The mct1 appears only once. If I change the second mct1 to mct2, the columns will appear well. Why can I add MultiColumnText only once? Thank you in advance and best regards! Peter -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com___ 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
Re: [iText-questions] MultiColumnText
Hegedűs Péter wrote: Why can I add MultiColumnText only once? That's documented: adding a (Multi)ColumnText object to a document consumes the content of the column (even when you add the column in simulation mode). Why? In your case, ALL the content is consumed because it fits the page. If the content doesn't fit the page, only the content that was already added to the document is consumed, and you can add the remaining content to another column. That's explained in chapter 7 of the book iText in Action. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ 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
Re: [iText-questions] MultiColumnText getting this error on our Unix server
pmartin wrote: java.lang.NoSuchMethodError: com.lowagie.text.pdf.ColumnText.addElement (Lcom/lowagie/text/Element;) This implies that the MultColumnText is not there It probably IS there, but the same error is thrown if: - the JVM used on the server is older than the JVM used to compile the jar, or - you have two different versions of the same library in your CLASSPATH. If the former is true: compile iText with an older JDK. If the latter is true: check your CLASSPATH and remove all old iText versions. This confirms that the class path and basic funtionalty of iText does work in the Unix environment. Of course iText works in a UNIX environment. I'm using it on Solaris, Debian and Fedora. Note that your problem is not iText related. It could happen with any jar file. br, Bruno - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText getting this error on our Unix server
1T3XT info info at 1t3xt.info writes: pmartin wrote: java.lang.SecurityException: class com.lowagie.text.pdf.MultiColumnT ext's signer information does not match signer information of other classes in the same package The last few jars that were released where signed with Bruno's private CAcert key. You are getting this exception because this key doesn't correspond with the way other jars are signed. This is a know problem. The next release will provide a signed jar and an unsigned jar. Meanwhile you could unjar the library, and then create a new iText jar that isn't signed. I have unjared and re-jared iText 2.0.8 without the signature and that did eliminate the certificate problem that I was having, but now I am getting the following error: java.lang.NoSuchMethodError: com.lowagie.text.pdf.ColumnText.addElement (Lcom/lowagie/text/Element;) at com.lowagie.text.pdf.MultiColumnText.addElement(Unknown Source at org.chestnet.createpdfutil.CreatePdf.createPdfFN2(CreatePdf.java:213 at org.chestnet.createpdfutil.CreatePdf.createPdf(CreatePdf.java:125 at org.chestnet.printing.SendToPrinterAction.execute (SendToPrinterAction.java:87 at org.apache.struts.action.RequestProcessor.processActionPerform (RequestProcessor.java:421 at org.apache.struts.action.RequestProcessor.process (RequestProcessor.java:226 at org.apache.struts.action.ActionServlet.process (ActionServlet.java:1164 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853 at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run (ServletStubImpl.java:971 at weblogic.servlet.internal.ServletStubImpl.invokeServlet (ServletStubImpl.java:402 at weblogic.servlet.internal.ServletStubImpl.invokeServlet (ServletStubImpl.java:305 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run (WebAppServletContext.java:6350 at weblogic.security.acl.internal.AuthenticatedSubject.doAs (AuthenticatedSubject.java:317 at weblogic.security.service.SecurityManager.runAs (SecurityManager.java:118 at weblogic.servlet.internal.WebAppServletContext.invokeServlet (WebAppServletContext.java:3635 at weblogic.servlet.internal.ServletRequestImpl.execute (ServletRequestImpl.java:2585 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170 This implies that the MultColumnText is not there - but again this works fine in my PC development environment but when I go to deploy to our Unix server I get the above error. Thinking that the version of 2.0.8 that I unjarred and jarred again might have a problem, I downloaded a different version, iText_1.5.4,jar and tried it. Again it works fine on the PC but not in the Unix environment. Lastly, I eliminated all columns references in my document and that does work on the Unix environment. This confirms that the class path and basic funtionalty of iText does work in the Unix environment. So again I am stumped as to why this method should work differently? Or is there something else I am missing? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] MultiColumnText getting this error on our Unix server
I am having no problem in the PC development environment using the latest iText 2.0.8 - but when I want to deploy the WebApp to our Unix environment I get the following error. I have never had this kind of error on library package before. I understand that someone different wrote this method - is there something I need to do so this class will be accepted by the server? java.lang.SecurityException: class com.lowagie.text.pdf.MultiColumnT ext's signer information does not match signer information of other classes in the same package - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText getting this error on our Unix server
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 pmartin wrote: | | java.lang.SecurityException: class com.lowagie.text.pdf.MultiColumnT | ext's signer information does not match signer information of other classes in | the same package Please make sure you don't have several versions of the iText jar package in your classpath as it's the likely cause for the exception. The newer iText.jar files are signed and this creates the issue but I believe the real cause is different iText packages on the class path as all classes on the com.lowagie.text.pdf are signed at the same time during the release process. Xavier - -- Xavier Le Vourch Brittany Software, Inc. [EMAIL PROTECTED] PGP Key (ID 0x896C5947): http://brittanysoftware.com/gpg_key.asc Key fingerprint: 73B3 6370 B8C5 4325 F2D8 4115 0372 5805 896C 5947 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHtMh5A3JYBYlsWUcRAmsOAKCXEZLCzVcYwvbBiRUZRGfZaMk5wgCfcK9X ADOcsfF5zLQdYKxFsgvAKks= =QXqL -END PGP SIGNATURE- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText getting this error on our Unix server
pmartin wrote: java.lang.SecurityException: class com.lowagie.text.pdf.MultiColumnT ext's signer information does not match signer information of other classes in the same package The last few jars that were released where signed with Bruno's private CAcert key. You are getting this exception because this key doesn't correspond with the way other jars are signed. This is a know problem. The next release will provide a signed jar and an unsigned jar. Meanwhile you could unjar the library, and then create a new iText jar that isn't signed. -- This answer is provided by 1T3XT BVBA - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
Aaron Baff wrote: This is where we had a slight misunderstanding. I am adding some text at the bottom of each page in a PageEvent, however, I am also using HeaderFooter object and calling .setFooter() on the Document object. Why? HeaderFooter isn't mentioned in the book. It's still in iText, but it's not compatible with the concept of adding content at absolute positions (that's what you're doing when using MultiColumnText). Add your footer in a PageEvent too. The output from the HeaderFooter _is_ affected by the Document's margins, and the MultiColumnText does _not_ seem to be taking into account the height of the HeaderFooter object when it calculates where to stop on a page. You are mixing two different iText concepts. That's like putting chocolate sauce or whipped cream on steak and fries. br, Bruno - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
On 10/7/07, Bruno Lowagie [EMAIL PROTECTED] wrote: Aaron Baff wrote: This is where we had a slight misunderstanding. I am adding some text at the bottom of each page in a PageEvent, however, I am also using HeaderFooter object and calling .setFooter() on the Document object. Why? HeaderFooter isn't mentioned in the book. It's still in iText, but it's not compatible with the concept of adding content at absolute positions (that's what you're doing when using MultiColumnText). Add your footer in a PageEvent too. Ah, well, here is where we are divergent. I don't actually own the book. I've done it all off of the example tutorials. http://itextdocs.lowagie.com/tutorial/ I suppose I'll go ahead and convert the footer over to doing it on a PageEvent. I as mostly trying to do things as quick as possible, even if it wasn't pretty. We're getting pretty darn close to the end of development and have way to much stuff left to do. --Aaron The output from the HeaderFooter _is_ affected by the Document's margins, and the MultiColumnText does _not_ seem to be taking into account the height of the HeaderFooter object when it calculates where to stop on a page. You are mixing two different iText concepts. That's like putting chocolate sauce or whipped cream on steak and fries. br, Bruno - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
Aaron Baff wrote: Anyone able to help me with this? Its really important that I get this fixed. I had the impression the problem was solved. Let me retry to rephrase the situation. You have a header and a footer. This header and footer is the same on every page. You add them with a page event and it's a piece of cake to find out their dimensions (Y-top and Y-bottom are the relevant coordinates). Now you want to add several columns. You can do this with MultiColumnText or ColumnText. If you use MultiColumnText, you can do this in an automated mode that takes into account the margins you defined (Y-top and Y-bottom). You can also tell MultiColumnText where to start the column (Y-top), but then you have to work with isOverflow(). You have tried this, but you answered you had a problem with that. You say you don't know how many rows each of these tables has before outputting them to the MCT, but I don't see why this is an issue. That should be completely irrelevant, unless there's something you're not telling us. If I had to do the job, I'd use ColumnText. But that's my personal taste. MultiColumnText is a convenience class built on top of ColumnText. It is meant to make your life easier. And it does for most people. If it doesn't make it easier for you, you'll have to give a better explanation why not because I don't see the problem. Honestly! br, Bruno - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
You have a header and a footer. This header and footer is the same on every page. You add them with a page event and it's a piece of cake to find out their dimensions (Y-top and Y-bottom are the relevant coordinates). This is where we had a slight misunderstanding. I am adding some text at the bottom of each page in a PageEvent, however, I am also using HeaderFooter object and calling .setFooter() on the Document object. The output from the HeaderFooter _is_ affected by the Document's margins, and the MultiColumnText does _not_ seem to be taking into account the height of the HeaderFooter object when it calculates where to stop on a page. --Aaron - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
Anyone able to help me with this? Its really important that I get this fixed. On 10/3/07, Aaron Baff [EMAIL PROTECTED] wrote: That's expected behavior. Make sure your header and footer remain inside the margins you defined when creating the Document object. Oh. I didn't realize this. I have to set the margin before I set the footer, correct? Up until now it hasn't been a problem, and when I've tried to set the margin I've always done it after I have set the footer which just simply pushed the footer higher up the page. Aaron - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
Aaron Baff wrote: Bruno, I think I see what seems to be happening. With the height specified, MultiColumnText will only go to that height, and not go onto another page. The problem with using isOverflow() for me is I am iterating over a list of objects each of which represents a 2 column table. So I do not know easily how many rows each of these tables have before outputting them to the MCT. That's not an issue. The remaining tables are in the MultiColumnText object. No need to worry about that. My big problem is, I have a footer on the page and the MCT at some points, on some columns (not consistantly) the text is intermixing with the footer text. Basically, it seems to me that MCT is honoring the document.bottomMargin(), but does not add the height of any footer that the document has into how far down it can go on the page before wrapping to the next column. That's expected behavior. Make sure your header and footer remain inside the margins you defined when creating the Document object. br, Bruno - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
That's expected behavior. Make sure your header and footer remain inside the margins you defined when creating the Document object. Oh. I didn't realize this. I have to set the margin before I set the footer, correct? Up until now it hasn't been a problem, and when I've tried to set the margin I've always done it after I have set the footer which just simply pushed the footer higher up the page. Aaron - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
Aaron Baff wrote: When I try and fix this by specifying the height I end up with only a single page worth of data Have you tried the method MultiColumnText.isOverflow(); as described in the book? br, Bruno - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] MultiColumnText alignment problems
Bruno, I think I see what seems to be happening. With the height specified, MultiColumnText will only go to that height, and not go onto another page. The problem with using isOverflow() for me is I am iterating over a list of objects each of which represents a 2 column table. So I do not know easily how many rows each of these tables have before outputting them to the MCT. My big problem is, I have a footer on the page and the MCT at some points, on some columns (not consistantly) the text is intermixing with the footer text. Basically, it seems to me that MCT is honoring the document.bottomMargin(), but does not add the height of any footer that the document has into how far down it can go on the page before wrapping to the next column. --Aaron On 10/2/07, Bruno Lowagie (iText) [EMAIL PROTECTED] wrote: Aaron Baff wrote: When I try and fix this by specifying the height I end up with only a single page worth of data Have you tried the method MultiColumnText.isOverflow(); as described in the book? br, Bruno - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] [iText-Questions] MultiColumnText and nextColumn()
Hi all, I want to add some text in a column, and then jump to another one to write something else. I tried to use MultiColumnText, but it doesn't seem to work well. Here is the code : MultiColumnText mct = new MultiColumnText(); mct.addSimpleColumn(document.left(), document.right()*1/3-10); mct.addSimpleColumn(document.right()*1/3, document.right()); mct.addElement(new Paragraph(blablabla)); mct.nextColumn(); mct.addElement(new Paragraph(blablabla)); mct.nextColumn(); mct.addElement(new Paragraph(blablabla)); document.add(mct); With this code, the text goes in the first column. if I add nextColumn() before I add some text, the first column is jumped. I don't understand how the composant and the method nextColumn() work. Is there another solution to force the text to jump to the next column, or a different composant to do it ? Thanks, -- Vincent CAURIER - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] MultiColumnText
HiI want to use MultiColumnText but I need to write them inside a PdfTemplate, but I can´t find a way to do this. Is it possible to do? How can I do this? If someone has an example, please, post it to me.ThanksRodrigo Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText
Use ColumnText. Paulo - Original Message - From: Develop [EMAIL PROTECTED] To: itext-questions@lists.sourceforge.net Sent: Friday, August 04, 2006 2:47 PM Subject: [iText-questions] MultiColumnText Hi I want to use MultiColumnText but I need to write them inside a PdfTemplate, but I can´t find a way to do this. Is it possible to do? How can I do this? If someone has an example, please, post it to me. Thanks Rodrigo - Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
[iText-questions] MultiColumnText problem
Hello, I have problem with column MultiColumnText. Actually I need to insert column with text into pdf page in case when rectangle is less then text which we whant to put in. And using MultiColumnText I can receive follow results: 1. if I set up height then engine add new page till don't put the whole text; 2. if I set up hight AUTOMATIC then it put the whole text into single page; The problem is that I need follow behaviour: I set up height of column and if it can't put the whole text into single page it skip rest of text. Can you help me to solve my problem? -- ~ABA Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText problem
Alexander Balashov wrote: I set up height of column and if it can't put the whole text into single page it skip rest of text. Can you help me to solve my problem? Use ColumnText instead of MultiColumnText. br, Bruno Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText in non-automatic mode
Matt White wrote: I haven't written the MultiColumnText class, but that's the way it was designed. MultiColumnText is supposed to be a simple class for people who are afraid of using ColumnText (if you had started writing your code with ColumnText, you wouldn't have had all these problems). Ah, I wish I had known this. I would have used ColumnText all along... I suppose it's not too late to do some refactoring. Anyway, this is a good opportunity to add some extra MultiColumnText features, so I added a new constructor to the MultiColumnText class in the CVS repository. ... code deleted for brevity ... No more iteration, just create the column text object with a top value, a desired height, define the regular columns, add the content and you have a mct object that can be added to the document without checking if there is an overflow. Where can I get a copy of the modified code? SF's anonymous CVS is still down. (I know, I know, don't complain, it's free...) Thanks for your help! - Matt --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText in non-automatic mode
Matt White wrote: Where can I get a copy of the modified code? SF's anonymous CVS is still down. (I know, I know, don't complain, it's free...) I don't know about the anonymous CVS, but I can see the changes using this link: http://cvs.sourceforge.net/viewcvs.py/itext/src/com/lowagie/text/pdf/MultiColumnText.java?rev=1.19view=log br, Bruno --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText in non-automatic mode
Matt White wrote: Where can I get a copy of the modified code? SF's anonymous CVS is still down. This link seems to be much faster: http://cvs.sourceforge.net/viewcvs.py/*checkout*/itext/src/com/lowagie/text/pdf/MultiColumnText.java?rev=1.19 br, Bruno --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText in non-automatic mode
Bruno - I get the following error at both links: Bad Gateway The proxy server received an invalid response from an upstream server. (With an HTTP 502 error.) I'm going to refactor the code to use ColumnText. I spent the weekend digging into MultiColumnText, and there's a few things in there I don't understand. (For example, why is nextY always reset to AUTOMATIC on newPage()? I think this is the issue!) Thanks again. - Matt bruno [EMAIL PROTECTED] 3/20/2006 8:38:42 AM Matt White wrote: Where can I get a copy of the modified code? SF's anonymous CVS is still down. This link seems to be much faster: http://cvs.sourceforge.net/viewcvs.py/*checkout*/itext/src/com/lowagie/text/pdf/MultiColumnText.java?rev=1.19 br, Bruno --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText in non-automatic mode
Bruno - Now we're getting somewhere, it no longer goes into a loop. :) Attached is another example. As I understand the way MultiColumnText works, it should produce three columns at the bottom of the page. Instead, it ignores the Y of the columns that I set, and puts them at the top of the page. - Matt Bruno Lowagie [EMAIL PROTECTED] 03/19/06 2:12 AM Matt White wrote: Bruno - Thanks for the reply. Since anonymous CVS access for projects that begin with i is down at SourceForge (see http://sourceforge.net/docman/display_doc.php?group_id=1docid=2352) So I see. In class MultiColumnText, I added one line in this method: private void newPage() throws DocumentException { resetCurrentColumn(); top = nextY = AUTOMATIC; totalHeight = 0; // this line was missing if (document != null) { document.newPage(); } } br, Bruno MultiColumnTest2.java Description: Binary data
Re: [iText-questions] MultiColumnText in non-automatic mode
Matt White wrote: Any clues on what I'm doing wrong are very welcomed. You're not doing anything wrong. I think it's a bug. I think I fixed it (see the CVS repository). br, Bruno --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText in non-automatic mode
Bruno - Thanks for the reply. Since anonymous CVS access for projects that begin with i is down at SourceForge (see http://sourceforge.net/docman/display_doc.php?group_id=1docid=2352), is there someplace else I can get a copy of the dev tree? - Matt Bruno Lowagie [EMAIL PROTECTED] 03/18/06 4:54 AM Matt White wrote: Any clues on what I'm doing wrong are very welcomed. You're not doing anything wrong. I think it's a bug. I think I fixed it (see the CVS repository). br, Bruno --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText in non-automatic mode
Matt White wrote: Bruno - Thanks for the reply. Since anonymous CVS access for projects that begin with i is down at SourceForge (see http://sourceforge.net/docman/display_doc.php?group_id=1docid=2352) So I see. In class MultiColumnText, I added one line in this method: private void newPage() throws DocumentException { resetCurrentColumn(); top = nextY = AUTOMATIC; totalHeight = 0; // this line was missing if (document != null) { document.newPage(); } } br, Bruno --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
[iText-questions] MultiColumnText in non-automatic mode
Hello - I'm not sure what I'm doing wrong with a MultiColumnText layout in non-automatic mode. An example is attached. If I call the MultiColumnText() constructor without any parameters it seems to work fine, but I can't specify the initial Y value for where I want the layout to appear. If I call the MultiColumnText(float) constructor, where you can specify a height of the layout, MultiColumnText.isOverflow() always returns true, and the system goes infinite. The attached example is based on the Irregular MultiColumnText example given on the iText website. Any clues on what I'm doing wrong are very welcomed. Thanks! - Matt MultiColumnTest.java Description: Binary data
RE: [iText-questions] MultiColumnText next column or next page problem
There's a lot of misunderstandings here: - until you do a document.add(mct) you are just gathering text in mct. A mct.nextColumn() will do nothing - onParagraphEnd isn't called in mct If you need that fine control use a ColumnText. Paulo -Original Message- From: raymond moesker [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 8:24 AM To: Paulo Soares Subject: RE: [iText-questions] MultiColumnText next column or next page problem ok here is some code to reproduce my problem: import java.awt.Color; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; import com.lowagie.text.Document; import com.lowagie.text.Element; import com.lowagie.text.Font; import com.lowagie.text.FontFactory; import com.lowagie.text.PageSize; import com.lowagie.text.Paragraph; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.BaseFont; import com.lowagie.text.pdf.MultiColumnText; import com.lowagie.text.pdf.PdfEncryptor; import com.lowagie.text.pdf.PdfReader; import com.lowagie.text.pdf.PdfWriter; public class Gen { String RGBBackground = ff; public byte[] generatePdf() { byte[] pdfOut = null; PdfReader reader = null; ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream finBaos = new ByteArrayOutputStream(); try { // Prepare the fonts Document document = new Document(PageSize.A4, 50, 50, 70, 70); float bottom = document.bottomMargin(); PdfWriter writer = PdfWriter.getInstance(document, baos); // use PageEvent (extends PdfPageEventHelper) for inserting the // header // and footer MyPageEvent pageEvent = new MyPageEvent(); writer.setPageEvent(pageEvent); Rectangle page = document.getPageSize(); try { // parse with radix at 16(hex) int rgb = Integer.parseInt(RGBBackground, 16); page.setBackgroundColor(new java.awt.Color(rgb)); } catch (NumberFormatException nfe) { // fallback to white page.setBackgroundColor(java.awt.Color.WHITE); } document.open(); // create the subheader document.add(makeParagraph( , 10, Element.ALIGN_LEFT, Font.NORMAL, false, Color.BLACK)); document.add(makeParagraph(head, 10, Element.ALIGN_LEFT, Font.BOLD, false, Color.BLACK)); document.add(makeParagraph(\n\n, 10, Element.ALIGN_LEFT, Font.NORMAL, false, Color.BLACK)); // set up 2 even columns with 10pt space between MultiColumnText mct = new MultiColumnText(); mct.addRegularColumns(document.left(), document.right(), 10f, 2); // Write body int size=15; for (int i = 0; i size; i++) { mct.addElement(new Paragraph(GALLIA est omnis divisa in partes,GALLIA est omnis divisa in partes,GALLIA est omnis divisa in partes ,GALLIA est omnis divisa in partes ,GALLIA est omnis divisa in partes ,GALLIA est omnis divisa in partes ,GALLIA est omnis divisa in partes ,GALLIA est omnis divisa in partes ,GALLIA est omnis divisa in partes )); if (i size - 1) { // Phrase p = new Phrase(\n\n, fontHelvetica10); Element p = makeParagraph(\n__\n\n, 8, Element.ALIGN_CENTER, Font.NORMAL, false, Color.GRAY); mct.addElement(p); mct.addElement(new Paragraph(GALLIA est omnis divisa in partes )); if(bottom-pageEvent.pPosition30) { mct.nextColumn(); } } } document.add(mct); document.close(); reader = new PdfReader(baos.toByteArray()); PdfEncryptor.encrypt(reader, finBaos, null, null, PdfWriter.AllowPrinting, false); pdfOut = finBaos.toByteArray(); baos.flush(); finBaos.flush(); baos.close(); finBaos.close(); } catch (Exception e) { System.out.print(e); } return pdfOut; } public Element makeParagraph(String text, int size, int alignment, int type, boolean fixed, Color r) { Font font = null; BaseFont fixedfont = null; if (!fixed) { font = FontFactory.getFont(Helvetica, size, type, r); } else { try { fixedfont = BaseFont.createFont(BaseFont.COURIER, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); } catch (Exception e) { e.printStackTrace(); } font = new Font(fixedfont, size, type, r); } Paragraph p = new Paragraph(text, font); p.setAlignment(alignment); p.setLeading(font.size() * 1.2f); return p; } public static void main(String[] args) { Gen pg = new Gen(); byte[] b = pg.generatePdf(); ByteArrayInputStream ba = new ByteArrayInputStream(b); FileOutputStream fos = null; try { fos = new FileOutputStream(new File(c:/test.pdf)); fos.write(b); fos.flush(); fos.close(); ba.close(); } catch (Exception e) { System.out.println(e); } System.out.println(ready
[iText-questions] MultiColumnText next column or next page problem
Some background info: Im trying to add articles to a PDF file using the MultiColumnText class. This works fine. My problem is when an article starts at the almost end of a column it has to move to the next column or next page if it is the second column.What I do: Im opening a Document.(Im using a PageEvent for adding the footer and header) Then I create a MultiColumnText. This MultiColumnText gets filled with articles and after it's filled it's added to the Document.My problems: 1. When Im using the mct.nextColumn() function within the MultiColumnText it only works for the first page.2. My first thought was to use a onParagraphEnd(PageEvent) to calculate the end of a Paragraph in a MultiColumnText. This only seems to work at the Document level. Does someone know a solution for my problem?(when a article starts at the almost end of a column it has to move to the next column or next page if it is the second column.) Thanks Ray Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.
[iText-questions] multicolumntext placement
Hello, is there a way to position MultiColumnText in absolute coordinates? That is I understand how to define the x-coordinate, but how to define the y? Tried addinging it to the PdfPTable that can be placed absolutely, but PdfPCell doesn't allow MCT to be added as a subelement. Is there a way out? Thank you! Ilja --- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61 plasma display: http://www.necitguy.com/?r=20 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
[iText-questions] MultiColumnText question
I'm new ;) So, if I use MultiColumnText without setting height (AUTOMATIC) my columns respect my pre-existing headers but not footers. If I manually define the height, I'm not sure how to do the looping required. I see from the tutorial a hasMoreText() method but I don't find that in my 1.3 version. Am I completly off-track here? I'm attempting to create two columns and adding enough content that at least two pages will be generated. __ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/ --- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
[iText-questions] MultiColumnText Balance - *Possible* Bug fix
While waiting for a response, I looked into this a bit further. It seems that this issue may have been inadvertently caused with some of the recent changes to the MultiColumnText class. (I say inadvertently because there didn't seem to be any documentation to the contrary - if this was an intentional feature, then I apologize ;-) ) I've attached a fix to the class, as well as a modification to the MultiColumnTextSimple test case that demonstrates the issue. I hope this helps! Thanks! Jerry -Original Message- From: Jerry Heinz Sent: Monday, May 23, 2005 3:04 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] [iText] MultiColumnText Balance When I updated my version of iText to 154, my documents using MultiColumnText started acting differently when they spanned multiple pages. If I add a MultiColumnText object midway through a page, when that object spans to a new page, it too starts midway through the page (please see the attached PDF for an example). Is there a way to turn this feature off? Thanks! Jerry MultiColumnText.java Description: MultiColumnText.java MultiColumnTextSimple.java Description: MultiColumnTextSimple.java MultiColumnTextSimple.pdf Description: MultiColumnTextSimple.pdf fixed_MultiColumnTextSimple.pdf Description: fixed_MultiColumnTextSimple.pdf
Re: [iText-questions] MultiColumnText balance
There isn't a general way to automatically balance the columns if they won't fill up the page. For a particular set of content, however, you can set the height of the Multicolumtext object to make it balance yourself. Dave Bender wrote: I'm new to iText and it looks great. But I hit a snag. I'm using the MultiColumnText object to put a series of articles into a PDF. The layout is a headline (added as a paragraph) that stretches across the page, followed by the body of the text in three columns using a MultiColumnText object. How can I get the columns to line up across the bottom, so the column lengths are equal? Is there a setting for this somewhere that handles this or do I need to delve into how the columns are rendered? Dave --- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
RE: [iText-questions] MultiColumnText balance
Thanks, Steve. About half of the articles I'm working with fill one page and move onto the next. The rest are less than a page. In either case, I'm ending up with the first column filled, then the second or third column only partially filled. If I use the height parameter, how do I determine how much height I need to set it at? i.e. how do I know how much text there will be? Particularly when it's a long article that fills one page? Dave -Original Message- From: Steve Appling [mailto:[EMAIL PROTECTED] Sent: Sunday, May 15, 2005 3:38 PM To: Dave Bender Cc: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] MultiColumnText balance There isn't a general way to automatically balance the columns if they won't fill up the page. For a particular set of content, however, you can set the height of the Multicolumtext object to make it balance yourself. Dave Bender wrote: I'm new to iText and it looks great. But I hit a snag. I'm using the MultiColumnText object to put a series of articles into a PDF. The layout is a headline (added as a paragraph) that stretches across the page, followed by the body of the text in three columns using a MultiColumnText object. How can I get the columns to line up across the bottom, so the column lengths are equal? Is there a setting for this somewhere that handles this or do I need to delve into how the columns are rendered? Dave --- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
[iText-questions] MultiColumnText balance
I'm new to iText andit looksgreat. But I hit a snag. I'm using the MultiColumnText object to put a series of articles into a PDF. The layout is a headline (added as a paragraph) that stretches across the page, followed by the body of the text in three columns using a MultiColumnText object. How can I get the columns to line up across the bottom, so the column lengths are equal? Is there a setting for this somewhere that handles this or do I need to delve into how the columns are rendered? Dave
[iText-questions] MultiColumnText
Maybe I missed this in the archives, but why doesn't MultiColumnText extends ColumnText? -- cheeser You can find my blog at http://cheeser.blog-city.com and on AIM as evan chooly --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] MultiColumnText
Multi columns are a collection of columns rather than an extension of a single one. - Original Message - From: Justin Lee [EMAIL PROTECTED] To: itext-questions@lists.sourceforge.net Sent: Thursday, March 17, 2005 8:53 PM Subject: [iText-questions] MultiColumnText Maybe I missed this in the archives, but why doesn't MultiColumnText extends ColumnText? -- cheeser You can find my blog at http://cheeser.blog-city.com and on AIM as evan chooly --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
Re: [iText-questions] multicolumntext
If you know what height the columns need to be to fill them evenly, you can specify a height for the MultiColumnText object so it won't occupy the whole page. - Original Message - From: Thomas Kübler [EMAIL PROTECTED] To: iText-questions@lists.sourceforge.net Sent: Thursday, February 03, 2005 2:23 AM Subject: [iText-questions] multicolumntext hallo, what are the benefit to use the multicolumntext instead of the columntext. the problem that i have is, that if i have two ore more columns on one page and there is not enough text to fill, that i wan't, that the filling of the columns is balanced. can i reach this with multicolumntext? with regards thomas -- Thomas Kübler Alt-Marienfelde 25 12277 Berlin Telefon 030.723.23.183 Fax 030.723.23.185 www.variex.de --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag--drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions --- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag--drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions
[iText-questions] MultiColumnText in PdfPCells
Hi Steve, it would be great if the MultiColumnText would be supported as nested element of PdfPCells. Best regards, Christian --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
RE: [iText-questions] MultiColumnText in PdfPCells
That's the same problem as writing text rotated 90 degrees. In this case the question is when to break the column. Best Regards, Paulo Soares -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Lauer Sent: Thursday, October 21, 2004 2:48 PM To: itext-questions Subject: [iText-questions] MultiColumnText in PdfPCells Hi Steve, it would be great if the MultiColumnText would be supported as nested element of PdfPCells. Best regards, Christian --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
[iText-questions] MultiColumnText
Ever since Christian Lauer posted some questions about adding ColumnText directly to a document, I've been thinking about how I would want to use it. Last night I made a helper class (MultiColumnText) that is an element and can be added to a document directly. It can handle regular or irregular columns and can either have a fixed height or flow to fill each page until all of its content is rendered. ColumnText is doing all the hard work underneath. To test it I made a random iText poem generator. This snippet shows how MultiColumnText is used: // param is height, AUTOMATIC fills full pages until out of content MultiColumnText mct = new MultiColumnText(MultiColumnText.AUTOMATIC); // params are left edge, right edge, gutter width, number of columns mct.addRegularColumns(document.left(), document.right(), 10f, 3); for (int i=0; i30; i++) { mct.addElement(newPara(randomWord(noun), Element.ALIGN_MIDDLE, Font.BOLDITALIC)); for (int j=0; j4; j++ ) { mct.addElement(newPara(poemLine(), Element.ALIGN_LEFT, Font.NORMAL)); } mct.addElement(newPara(randomWord(adverb), Element.ALIGN_LEFT, Font.NORMAL)); mct.addElement(newPara(\n\n, Element.ALIGN_LEFT, Font.NORMAL)); } document.add(mct); Would anyone be interested in something like this? I'll be glad to contribute MultiColumnText or enhance it if anyone thinks it is useful. I have attached the resulting iText poems for your amusement (I'm apparently easily amused). I liked the line drunken PdfPTable halts finally (no offense intended Paulo). itext-poetry.pdf Description: Adobe PDF document
Re: [iText-questions] MultiColumnText
- Original Message - From: Steve Appling [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 24, 2004 20:50 Subject: [iText-questions] MultiColumnText Ever since Christian Lauer posted some questions about adding ColumnText directly to a document, I've been thinking about how I would want to use it. Last night I made a helper class (MultiColumnText) that is an element and can be added to a document directly. It can handle regular or irregular columns and can either have a fixed height or flow to fill each page until all of its content is rendered. ColumnText is doing all the hard work underneath. To test it I made a random iText poem generator. This snippet shows how MultiColumnText is used: // param is height, AUTOMATIC fills full pages until out of content MultiColumnText mct = new MultiColumnText(MultiColumnText.AUTOMATIC); // params are left edge, right edge, gutter width, number of columns mct.addRegularColumns(document.left(), document.right(), 10f, 3); for (int i=0; i30; i++) { mct.addElement(newPara(randomWord(noun), Element.ALIGN_MIDDLE, Font.BOLDITALIC)); for (int j=0; j4; j++ ) { mct.addElement(newPara(poemLine(), Element.ALIGN_LEFT, Font.NORMAL)); } mct.addElement(newPara(randomWord(adverb), Element.ALIGN_LEFT, Font.NORMAL)); mct.addElement(newPara(\n\n, Element.ALIGN_LEFT, Font.NORMAL)); } document.add(mct); Would anyone be interested in something like this? I'll be glad to contribute MultiColumnText or I'm interested. There's nothing to generate multicolumn out of the box. enhance it if anyone thinks it is useful. I have attached the resulting iText poems for your amusement (I'm apparently easily amused). I liked the line drunken PdfPTable halts finally (no offense intended Paulo). We can't avert fate... The truth is out there. Best Regards, Paulo Soares --- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php ___ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions