AlivePDF icon indicating copy to clipboard operation
AlivePDF copied to clipboard

Bug in setAutoPageBreak

Open GoogleCodeExporter opened this issue 10 years ago • 2 comments

What steps will reproduce the problem?
1. create a PDF with addCell long enough to span two pages

What is the expected output? What do you see instead?
The page should break before the bottom margin. Instead it goes to the end
of the page height.

Please provide any additional information below.

Two lines of code should change:

line 404 should read:       
private function setAutoPageBreak( auto:Boolean,margin:Number,t:Number=0 ):void

currently margin is set to int in this method which is not consistent with
margin elsewhere in the script.

line 245 should read:
setAutoPageBreak (true, margin * 2 );

The multiplier of 2 is consistent with the approach taken in FPDF and
produced the correct result in my testing (unlike the bitwise operator).

Thanks for a great library!  - Kevin


Original issue reported on code.google.com by [email protected] on 28 Jan 2008 at 8:33

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter

[deleted comment]

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter

Hi kevin,

nice ones ;)

tks a bunch,

fixed for the next release ;)

Thibault

Original comment by thibault.imbert on 28 Jan 2008 at 6:24

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter