remcoboerma / pyfpdf

Automatically exported from code.google.com/p/pyfpdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Ln parameter of Cell does not work. Ln() default does not work. Multicell causes divide by zero fault. #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Program Cell macro with Ln parameter of 1. Line feed does not occur.
2.Program Ln macro with blank parameter.  Default line feed does not occur.  
Ln(.25) works when FPDF units specifies inches.
3.Program Multicell macro.  Line length calculation causes Divide by Zero error 
(max width calc divides by font_size)

What is the expected output? What do you see instead?
Cases 1 & 2:  overprinting of text on one line, because of no line feed.
Case 3:  Program fails due to untrapped error.

Also, spelling of Setfont must be set_font, Multicell must be multi_cell
Addpage must be add_page.  These changes not documented.

What version of the product are you using? On what operating system?
Version is 1.7 date of last update 2012-07-14.  I am using Windows 7.

Please provide any additional information below.
I stepped the program through and saw the y (vertical) variable updated.
Yet, the variable was restored to previous value before the next command.  
Suspect that an earlier version of fpdf worked, possible conflict between local 
and global variables -- but I am just guessing.

Original issue reported on code.google.com by philHjea...@gmail.com on 27 Dec 2013 at 1:12

GoogleCodeExporter commented 9 years ago
Thanks for reporting, could you provide a test case (sample code) to reproduce 
this issue?

In which line does it raises an exception?
Where do we fix camel cases spelling errors?

y variable is inside cell (not multi_cell), and there should be any conflict 
with local and global variables as globals aren't used, in fact self.y is a 
instance attribute and y is a local variable only used to calculate borders.

Original comment by reingart@gmail.com on 5 Feb 2014 at 4:08

GoogleCodeExporter commented 9 years ago
First a piece of code using fpdf that works correctly.
Second examples of errors where the ln() parameter is omitted or has no 
argument.

Original comment by philHjea...@gmail.com on 6 Feb 2014 at 4:43

Attachments: