Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

font color="#000000" -> global name 'color' is not defined #59

Closed
GoogleCodeExporter opened this issue Jul 9, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link
Contributor

What steps will reproduce the problem?
1. pdf.html_write("<p><font color="#ff0000">A</font></p>")


What is the expected output? 
A red letter "A"

What do you see instead?
Global name "color" is not defined


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


Please provide any additional information below.

I am not sure, but I think, in html.py line 217

            if 'color' in attrs:
                self.color = hex2dec(attrs['color'])
                self.set_text_color(*color)
                self.color = color  


should be:

            if 'color' in attrs:
                color = hex2dec(attrs['color'])
----------------^^^^^^
                self.set_text_color(*color)
                self.color = color  

Anyway, which this modification it works.

Original issue reported on code.google.com by mweis...@gmail.com on 3 May 2013 at 9:39

@GoogleCodeExporter
Copy link
Contributor Author

Original comment by vadm...@gmail.com on 18 Mar 2015 at 5:25

  • Changed state: Duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant