NishilSB / alivepdf

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

Grid Headers appear twice #295

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using the following code:

var pdf:PDF = new PDF(Orientation.LANDSCAPE, Unit.MM, true, Size.A4);
                pdf.setDisplayMode(Display.FULL_PAGE, 
                Layout.SINGLE_PAGE);

var newPage:Page = new Page(Orientation.LANDSCAPE, Unit.MM, Size.A4);
pdf.addPage(newPage);

pdf.setAuthor("EasyMessage - Multivision");
pdf.setCreator("Plataforma online EasyMessage");
pdf.setTitle("Relatório SMS");
pdf.setSubject("Relatório de envio de SMS");

pdf.addImage(new Logo(), null, 5, 5, 0, 0, 0, 1, true, ImageFormat.JPG);

pdf.setFont(new CoreFont(FontFamily.HELVETICA_BOLD), 20);
pdf.textStyle(new RGBColor(0x000000));

pdf.addText("Histórico SMS", 100, 30);

pdf.setFont(new CoreFont(FontFamily.HELVETICA), 12);

var gridColumnData:org.alivepdf.grid.GridColumn = new 
            org.alivepdf.grid.GridColumn("Data", "data", 120, 
            Align.LEFT, Align.LEFT);
var gridColumnQuantidade:org.alivepdf.grid.GridColumn = new 
            org.alivepdf.grid.GridColumn("Quantidade", 
            "quantidade", 60, Align.LEFT, Align.LEFT);

var columns:Array = new Array(gridColumnData, gridColumnQuantidade);

var grid:Grid = new Grid(getRelatorios.lastResult.toArray(), 0, 0, new 
            RGBColor(0x4D4D4D), new RGBColor(0xCCCCCC), true,
            new RGBColor(0x887711), new RGBColor(0x000000),
             .1, 9, 7, "0 j", columns );

pdf.addGrid(grid, 10, 70);

var file:FileReference = new FileReference();

file.addEventListener(IOErrorEvent.IO_ERROR, erroIOgravarPDF);
file.addEventListener(SecurityErrorEvent.SECURITY_ERROR, 
            erroSecurityGravarPDF);
file.addEventListener(Event.COMPLETE, pdfComplete);

var bytes:ByteArray = pdf.save( Method.LOCAL );
file.save( bytes, "Teste.pdf" );

2. The outcome is shown in the file attached

What is the expected output? What do you see instead?
The grid should appear where the first header is. The first header shouldn't be 
there.

What version of the product are you using? On what operating system?
Windows 7 Home Edition, Flash Player 10,1,103,20, Alive PDF from SVN revision 
275

Please provide any additional information below.

Original issue reported on code.google.com by jorge.ra...@gmail.com on 10 Jan 2011 at 6:19

Attachments:

GoogleCodeExporter commented 8 years ago
P.S.: Using flash builder burrito and flex hero.

Original comment by jorge.ra...@gmail.com on 11 Jan 2011 at 10:48

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I get rid of it.
In function addGrid() of PDF.as about line 3960.
            //setXY (x +currentGrid.x, y+getY() );
            //addRow( columnNames,'', rect);
            //endFill();

Original comment by jeff_j...@126.com on 19 Jan 2011 at 9:25

GoogleCodeExporter commented 8 years ago
i just comment 3960-3963 but it does not make any difference.

Original comment by erdogano...@gmail.com on 19 Jan 2011 at 10:11

GoogleCodeExporter commented 8 years ago
Hi Jeff.

Thanks for you contribution. It worked for me.

@Erdogano: the code Jeff indicated was on the lines 3936-3938 on my version. 
Try those ones and see if it solves the issue for you.

Original comment by jorge.ra...@gmail.com on 19 Jan 2011 at 12:12

GoogleCodeExporter commented 8 years ago
sorry, the problem resolved, i think there something remains in the cache.

thanks jeff

Original comment by erdogano...@gmail.com on 19 Jan 2011 at 12:57

GoogleCodeExporter commented 8 years ago
Fixed in PDF.as

Original comment by cgauth...@gmail.com on 28 Feb 2015 at 12:20