ReptarX / pyfpdf

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

Unable to find documentation for how to rotate a cell, text, etc. #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Starting with tuto1.py and modified it a below.

from pyfpdf import FPDF

pdf=FPDF()
pdf.add_page()
pdf.set_font('Arial','B',16)
g=pdf.cell(40,10,'Hello World!')
pdf.rotate(g,45)

2. I have tried to use pdf.rotate(...) to rotate the cell to an arbitray angle.
3. This may just be a documentation issue.

What is the expected output? What do you see instead?
I hope to see the text rotate by the input angle.  What I get instead is and 
error as shown below.

> "C:\Python26\python.exe"  
"C:\Python26\Lib\site-packages\pyfpdf\tutorial\tuto1.py" 
Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\pyfpdf\tutorial\tuto1.py", line 7, in <module>
    pdf.rotate(g,45)
  File "C:\Python26\lib\site-packages\pyfpdf\fpdf.py", line 547, in rotate
    angle *= math.pi/180;
TypeError: unsupported operand type(s) for *=: 'NoneType' and 'float'

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

Current download installed in the site-packages directory.  The OS is windows XP
Please provide any additional information below.

Original issue reported on code.google.com by tsiz...@gmail.com on 14 Oct 2010 at 5:18

GoogleCodeExporter commented 9 years ago
Please mark this as complete.  I realized my error and have corrected it.

Original comment by tsiz...@gmail.com on 14 Oct 2010 at 7:09

GoogleCodeExporter commented 9 years ago
Thanks

For documentation, if python one isn't available, you could see php one, it 
should be similar.

Original comment by reingart@gmail.com on 24 Nov 2010 at 12:03