equal
deleted
inserted
replaced
75 |
75 |
76 from reportlab import rl_config |
76 from reportlab import rl_config |
77 from reportlab.lib import styles |
77 from reportlab.lib import styles |
78 from reportlab.lib import colors |
78 from reportlab.lib import colors |
79 from reportlab.lib.units import cm |
79 from reportlab.lib.units import cm |
80 from reportlab.lib.utils import getBytesIO |
80 from reportlab.lib.utils import getBytesIO, isStr |
81 from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY |
81 from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY |
82 from reportlab.pdfbase import pdfmetrics |
82 from reportlab.pdfbase import pdfmetrics |
83 from reportlab.pdfgen import canvas |
83 from reportlab.pdfgen import canvas |
84 from reportlab.platypus.doctemplate import SimpleDocTemplate |
84 from reportlab.platypus.doctemplate import SimpleDocTemplate |
85 from reportlab.platypus.flowables import Flowable |
85 from reportlab.platypus.flowables import Flowable |
201 |
201 |
202 |
202 |
203 def checkColor(col): |
203 def checkColor(col): |
204 "Converts a color name to an RGB tuple, if possible." |
204 "Converts a color name to an RGB tuple, if possible." |
205 |
205 |
206 if type(col) == type('') and col in dir(colors): |
206 if isStr(col): |
207 col = getattr(colors, col) |
207 if col in dir(colors): |
208 col = (col.red, col.green, col.blue) |
208 col = getattr(colors, col) |
|
209 col = (col.red, col.green, col.blue) |
209 |
210 |
210 return col |
211 return col |
211 |
212 |
212 |
213 |
213 def handleHiddenSlides(slides): |
214 def handleHiddenSlides(slides): |