Re: [iText-questions] PdfPTable padding and spacing

2010-06-10 Thread Wain, Matthew
Cool, thanks Thomas :-) Just makes your fix clear to everyone. Good luck with the rest of your assignment. -Original Message- From: fhomasp [mailto:thomas.peet...@realdolmen.com] Sent: 10 June 2010 09:13 To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] PdfPTable

Re: [iText-questions] PdfPTable padding and spacing

2010-06-10 Thread fhomasp
Right, sorry.. I changed document.add(main); to main.writeSelectedRows(0,main.getRows().size(),0f,main.getTotalHeight(),canvas); cheers ;-) -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfPTable-padding-and-spacing-tp2248510p2250062.html Sent from the iText - G

Re: [iText-questions] PdfPTable padding and spacing

2010-06-10 Thread Wain, Matthew
ssage- From: fhomasp [mailto:thomas.peet...@realdolmen.com] Sent: 10 June 2010 07:33 To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] PdfPTable padding and spacing That seems to have done the trick indeed. It's actually all I needed. Here's an example of m

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
Fair enough, and I'll keep that in mind for next time :-) int value would not have been okay. I get the interval sizes in mm, which needs to be converted to points. And it has to be exact. Oh, Off topic. Watch "Oog in oog" tonight, I'll be there asking a question ^^ -- View this message in c

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
fhomasp wrote: > That seems to have done the trick indeed. It's actually all I needed. Another way could have been to round the page size to an integer value. Because it's odd to have a page size defined in ten thousands of a point... > Here's an example of my output.. Perhaps it'll be more cle

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
That seems to have done the trick indeed. It's actually all I needed. Here's an example of my output.. Perhaps it'll be more clear as to why I chose to use PfdPTables. http://rapidshare.com/files/397335667/out.rar.html Thanks! -- View this message in context: http://itext-general.2136553.n

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
fhomasp wrote: > After processing, every document has the following properties of importance. > > Document: pagesize.ury --> 1082.8346 > pagesize.urx --> 243.77954 > > Table: totalheight: 1082.8345 > toalwidth: 243.77954 You're experiencing rounding errors caused b

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
> I've done a similar assignment for "De Persgroep". > It took me less than 2 days ;-) > The code is used in several magazines and in HLN. Linkedin rules? :-) I've been here at this project for one week and a half. The code I have now was finished in one week, except for this problem I'm havin

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
fhomasp wrote: > The document needs to be printed in a newspaper. I've done a similar assignment for "De Persgroep". It took me less than 2 days ;-) The code is used in several magazines and in HLN. > The maximum is the largest > size of the page of the newspaper. The other intervals are the le

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
And of course I mean TableInstance.getTotalHeight(); -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfPTable-padding-and-spacing-tp2248510p2248902.html Sent from the iText - General mailing list archive at Nabble.com. -

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
As addition... Everything works except for the occasional glitch of the size of the table. Somehow when the document is being made the table appears to be larger than it said itself (table.getTotalSize). But that's one my assumptions, I learned not to go too much on those. My problem seems to

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
The document needs to be printed in a newspaper. The maximum is the largest size of the page of the newspaper. The other intervals are the lengths given to me where the document can be cut. So if I have a resulting table of 5cm and the interval is 80mm I need to fill the rest up with whitespace

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
fhomasp wrote: > The output document needs to be of a fixed height interval, depending on how > much rows there are. So let's say the fixed interval is an inch, then the height of the document needs to be a multiple of 72pt. > I cannot just output on extra pages anytime i want. You need a sing

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
Excuse me but I did the effort of building a JUnit test to show the problem. If you had simply attempted to run it, which takes about 5 secs you would easily have seen what I meant, no offense. But I'll explain in detail. The output document needs to be of a fixed height interval, depending on

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread Wain, Matthew
...@realdolmen.com] Sent: 09 June 2010 11:42 To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] PdfPTable padding and spacing This is my new cell config: private void applyDefaultCellProps(PdfPCell cell){ cell.setBorder(PdfPCell.NO_BORDER

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
fhomasp wrote: > But still. A tables size is its size, right? You were talking about padding, not about table size. > ascending or descending, > should it really matter when cutting the document to the size of the table? > Really, forgive me for being ignorant but all I can do is ask. Messages

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread Wain, Matthew
t-questions@lists.sourceforge.net Subject: Re: [iText-questions] PdfPTable padding and spacing This is my new cell config: private void applyDefaultCellProps(PdfPCell cell){ cell.setBorder(PdfPCell.NO_BORDER); cell.enableBorderSide(Rectangle.LEFT); ce

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
This is my new cell config: private void applyDefaultCellProps(PdfPCell cell){ cell.setBorder(PdfPCell.NO_BORDER); cell.enableBorderSide(Rectangle.LEFT); cell.enableBorderSide(Rectangle.RIGHT); cell.setPadding(5); cell.setPaddingTop(0); cell.setPad

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread Wain, Matthew
n.com] Sent: 09 June 2010 11:34 To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] PdfPTable padding and spacing Sorry... I must have missed the ascender descender thing. I'll give that a shot now. But still. A tables size is its size, right? ascending or descending,

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
Sorry... I must have missed the ascender descender thing. I'll give that a shot now. But still. A tables size is its size, right? ascending or descending, should it really matter when cutting the document to the size of the table? Really, forgive me for being ignorant but all I can do is ask.

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
fhomasp wrote: > It's ok in 80% of the documents, but there are still documents cut badly. Because of the ascender/descender? -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Thin

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
For clarification, here's the whole testcase again: As you can see I'm not using negative values anymore for the padding, just the textspacing. The document is still cut wrongly. @Test public void testSizeBug() throws DocumentException, FileNotFoundException { PdfPTable main = new P

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
Well.. It seems that the padding isn't really fixing all of the document cutting problems. These are my cell settings now: private void applyDefaultCellProps(PdfPCell cell){ cell.setBorder(PdfPCell.NO_BORDER); cell.enableBorderSide(Rectangle.LEFT); cell.enableBorderSide(

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
Yes well.. I was attempting to avoid having to know which cell is the first in a bunch. The ad documents contain several headers so there are several first cells. But ok, I'll go about it this way. I do still think the cutting of the document, even when using contradicting padding values and s

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
Wain, Matthew wrote: > BTW, not sure if the comment about a new thread everytime is to me You are registered as a subscriber to the list. Thomas isn't. Which is very annoying: his mail is always put on hold, and an administrator needs to manually approve it. (If all mail would be accepted, you'd a

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread Wain, Matthew
e.net Subject: Re: [iText-questions] PdfPTable padding and spacing I need a bit of padding on the bottom of the cells. If I set for example: cell.setPadding(5); cell.setPaddingTop(0); cell.setPaddingBottom(4); Then the space between the cells is still too large. And I do need bottom padding (sounds

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread 1T3XT info
fhomasp wrote: > I need a bit of padding on the bottom of the cells. If I set for example: > > cell.setPadding(5); > cell.setPaddingTop(0); > cell.setPaddingBottom(4); > > Then the space between the cells is still too large. And I do need bottom > padding (sounds like fun) otherwise the text i

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
I need a bit of padding on the bottom of the cells. If I set for example: cell.setPadding(5); cell.setPaddingTop(0); cell.setPaddingBottom(4); Then the space between the cells is still too large. And I do need bottom padding (sounds like fun) otherwise the text in the cell is placed exactly o

Re: [iText-questions] PdfPTable padding and spacing

2010-06-09 Thread Wain, Matthew
e.net Subject: [iText-questions] PdfPTable padding and spacing Hey, First of all, sorry for the double post but I do need the advice and I do realize that the initial thread got started off on the wrong foot. I made a unit test to show how I encounter the problem. Note that the whole document is c

[iText-questions] PdfPTable padding and spacing

2010-06-09 Thread fhomasp
Hey, First of all, sorry for the double post but I do need the advice and I do realize that the initial thread got started off on the wrong foot. I made a unit test to show how I encounter the problem. Note that the whole document is cut of exactly at the end of the table, so the table should al