AlivePDF icon indicating copy to clipboard operation
AlivePDF copied to clipboard

Some addGrid bugs

Open GoogleCodeExporter opened this issue 10 years ago • 1 comments

What steps will reproduce the problem?
1. add more tables and set setGridPositionOnNextPages 

What is the expected output? What do you see instead?

I'm expecting that tables are drawn starting from nextPageY. Instead they are 
drawn without respecting the defined values.

What version of the product are you using? On what operating system?

Last version available in source.

Please provide any additional information below.

For me the problem is in PDF.as:

- Function: setGridPositionOnNextPages
X and Y values are exchanged, they are:

nextPageX = yvalue;
nextPageY = xvalue;

instead they have to be:

nextPageX = xvalue;
nextPageY = yvalue;

- Function: addGrid

1) These 3 lines have to be deleted because they're producing duplicate table 
headers:

setXY (x +currentGrid.x, y+getY() );
addRow( columnNames,'', rect);
endFill();

2) before the line addRow( columnNames, GridRowType.HEADER, rect ); I suggest 
to change the current setXY with:

var posX:Number = x+getX();
var posY:Number = y+getY();
if (posY < nextPageY) posY = nextPageY;
setXY ( posX, posY );

In this way all the tables start correctly from nextPageY in any case.

I've applyed this modifies to my project and all seems to go right.

Original issue reported on code.google.com by [email protected] on 5 Feb 2015 at 5:05

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter

Problem #1 (duplicate headers) fixed in PDF.as

Original comment by [email protected] on 28 Feb 2015 at 12:23

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter