spadged / alivepdf

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

Bug in setAutoPageBreak #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 heythere...@gmail.com on 28 Jan 2008 at 8:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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