|
Lior:
I looked at your code and the what I don't see is
the table output code. It should be something like:
table.writeSelectedRows(0, -1, 32, 210,
cb);
That may fix it. Let me know if not.
Thanks,
Kenny
----- Original Message -----
Sent: Thursday, January 30, 2003 8:26
AM
Subject: Re: [iText-questions] Dynamic
creation of PDF with JSP
I haven't looked at your code yet but I thought
I'd mention something that I ran in to during my early development. A
table row will not print unless every cell has been populated (empty cells
must be populated with ""). So if your table is defined as having 8
columns, you must fill all 8 cells before the row will print...it is not a
cell by cell print. See if this helps. If not, I'm going to look
at your code and get back to you.
Take care,
Kenny
----- Original Message -----
Sent: Wednesday, January 29, 2003 4:43
PM
Subject: Re: [iText-questions] Dynamic
creation of PDF with JSP
Kenny,
I'm having a problem with the tables. I'm using some of your code right
now until I get it working right and then going back to refine it...but it's
still not coming out right. I attached the java file that I have, and even
if you remove the query stuff in there (out of the while loop) the tables
don't print.
I'm not getting any errors at all, I'm just getting the two headers to
print out at the top of the page, and the rest of the report is just blank.
Any ideas?
Thanks,
Lior
"Kenny G. Dubuisson, Jr."
<[EMAIL PROTECTED]> wrote:
Lior:
The best way for me to explain this is to say
that, to control page breaks, repeating headers, etc. you have to keep
track of you position on the page and how much available page you have
left after each row output. You will notice in my code that I sent
you that before I output a row to a page, I check to see how much page is
available. If there isn't much available, I create a new page,
output the table header, and then output my row. This may sound like
a lot of work but once you get used to it, it works extremely well and I
like having exact control over where everything goes. I hope you
have as much success with it as I have.
As far as helping you, I am more than glad
to. I wouldn't be where I am now in my development if it weren't for
the people on this list. I'm just trying to return the
favor.
Take care,
Kenny
----- Original Message -----
Sent: Wednesday, January 29, 2003
10:59 AM
Subject: Re: [iText-questions]
Dynamic creation of PDF with JSP
Kenny,
Also, how can I determine the end of a page on the PDF. So if my
report is in a table that is bordered, and I want to be able to maintain
the look of the report inside the table that when the page ends there is
a new line that closes off the table, and in the next page the report is
continued in another table...man I'm confusing myself.
The reports that I'm generating are for stock trades for brokers, so
I don't know excatly how long the report can be...it can be very short,
or it can be incredibly long with the data for one broker flowing on and
on and on. So I want to be able to know how to contain the data in
a nice format, so the person who's reviewing it can read it and so that
it maintains the look and feel of the website...etc.
I hope I'm making sense, and this seems to be a big undertaking. So
any help would be wonderful.
Thanks, Lior
"Kenny G. Dubuisson, Jr."
<[EMAIL PROTECTED]> wrote:
Lior:
Sounds like you want to do what I
did. I was generating reports via JSP that were pretty
long. I didn't like the fact that there were no page breaks or
repeat headers and stuff via the HTML so I decided to try iText.
And I want you to know that I really like it but it did take a bit of
development since now all my reports are generated via servlets
instead of JSP. But if you want nice looking reports with total
control over the layout, iText is the way to go.
As far as variables, I've got tons of
them in my servlets that generate the PDF and it works
great.
Hope this info helps...let me know if you
need more info.
Kenny
----- Original Message -----
Sent: Wednesday, January 29,
2003 9:04 AM
Subject: [iText-questions]
Dynamic creation of PDF with JSP
Hello everyone,
I was just wondering about th whole process of generating a PDF
on the fly. I have a report that is generated, and it's pretty
big, and I want the output, instead of going to a JSP page, to
go to the PDF file so it can be send over to a client.
I was wondering how to go about doing that, since I'm not quite
sure about how to work in variables into the PDF. Any help would be
greatly appreciated.
Thanks,
Lior
Do you Yahoo!? Yahoo!
Mail Plus - Powerful. Affordable. Sign
up now
Do you Yahoo!? Yahoo!
Mail Plus - Powerful. Affordable. Sign
up now
Do you Yahoo!? Yahoo!
Mail Plus - Powerful. Affordable. Sign up
now
|