Hi,
** We are doing the following:
We are generating a PDF which contains a table with
column width 100.
But the data(extracted from the Database) to be
inserted in that column contains more than 2000
characters.
As a result, we get an "Out of Memory Exception - Java
Heap Space".
i)But if we insert small amount of data in the same
column(width remaining same) , it works fine.
ii)Also, when we increase the width of the column to
150(no. of characters being same) , it too works fine.
We have attached the XML file (PDFTableView.xml) and
the code(PDFTableView.java) where we are getting the
above mentioned exception.
** How are we doing it ?
1) Draw a table with column width given in
xml(NSWidthBinding).
2) for(noOfRows)
{
for(noOfColumns)
{
Create a dataObject for each Column;
Fetch data (from column of the table in
Database)
in dataString;
Insert dataString in dataCell;
Add dataCell to dataTable;
}
}
I feel that the dataString.length() is very large and
does not fit in the dataCell -- as a result we are
getting the "Out Of Memory Exception!!"
I came to this conclusion because if the
dataString.length() is SMALL OR the column width is
LARGE , then it works fine..
So, I feel the exception has something to do with the
size constraint of the Cell(width of the column).
Please let us know if we need to follow any guidelines
for setting up the fonts & column widths of the cell
or do let us know if there is any generic fix for the
above issue for all font types, styles and sizes
Thanks & Regards,
Vijay.
--- Bruno Lowagie <[EMAIL PROTECTED]> wrote:
> Aneel Koti wrote:
> > Hi,
> >
> > We are creating PDF documents and we are facing
> issues
> > while generating PDF if there are large amounts of
> > data in a single cell of a table.
> > It fails with "Out of Memory Exception -- Java
> Heap
> > Space".
> > Width of the cell we have used is 175 and if the
> data
> > in the cell exceeds length of 3000 (for a specific
> > font), PDF generator crashes with the above
> mentioned
> > exception.
> > If the width is increased to 200 it works but,
> only
> > for the above particular scenario and for one
> > particular font. As we dont have control of the
> data
> > that is included in the cell, we were not able to
> fix
> > the column width of the cells of the table.
> > Please let us know if we need to follow any
> guidelines
> > for setting up the fonts & column widths of the
> cell
> > or do let us know if there is any generic fix for
> the
> > above issue for all font types, styles and sizes.
>
> Please provide a small standalone example that
> reproduces the problem. We have no idea if you
> are doing something wrong if you only tell us
> WHAT you are doing, not HOW you are doing it.
> Also specify what yo mean by "a length of 3000".
> Is it 3000 user units? points? lines?
> You have to be more clear.
> br,
> Bruno
>
>
-------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> iText-questions mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Do you like iText?
> Buy the iText book:
> http://www.1t3xt.com/docs/book.php
> Or leave a tip: https://tipit.to/itexttipjar
>
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total
Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar