kpuchalski / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

data in grid cells overlapping #116

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a datagrid with some data,(make one cell data more than 50 char) 
and make the datagrid variable rowheight and set wordwrap true for the 
larg cell.
2.now create pdf using addGrid method. few rows data overlapping for the 
large cell 
3. I attached sample pdf file

What is the expected output? What do you see instead?
grid needs to be disapley with out data over lapping

What version of the product are you using? On what operating system?
AlivePDF_0.1.4.8 on windows XP

Please provide any additional information below.

Original issue reported on code.google.com by balaje...@gmail.com on 24 Apr 2009 at 7:49

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same problem. The bug is caused by the way that the cell text length 
is
calculated. This length takes into account the length of each character of the 
string
but only the "standard" characters and not the specials like yours "ü" or 
similar (á,
Á, ç, ñ).

I've solved it modifying (version 0.1.4.9) the function "nbLines" of class 
"PDF.as".

In this function you have to replace line 3107 which code is: 
   l+=cw[c];
For something that compares if cw[c] value is number and if it's not, then 
assign
some valid value.

if (isNaN(cw[c])){
    l+=580;
}
else{
    l+=cw[c];
}

This "580" value is used in other functions of the same class that also 
calculates
the length of the string.

I expect in the next versión of the library this bug will be solved but now 
you coult
try to patch it with those lines.

Original comment by cyberhom...@gmail.com on 22 Jun 2009 at 1:53

GoogleCodeExporter commented 9 years ago
Patch by cyberhomerj works for me

Original comment by sne...@gmail.com on 13 Oct 2009 at 1:52

GoogleCodeExporter commented 9 years ago
cyberhomerj, thanks for your patch! It took me hours for fighting again this 
issue,
your patch works great!! Thanks again!

-Jens 

Original comment by sect...@gmail.com on 4 Nov 2009 at 5:50

GoogleCodeExporter commented 9 years ago
Hi there,

Good catch cyberhomerj!

This is fixed in the latest drop on the svn.

Thanks!

Thibault

Original comment by thibault.imbert on 24 Jan 2010 at 2:09