[reportlab-users] PythonPoint - New features
John Precedo
reportlab-users@reportlab.com
Tue, 3 Sep 2002 17:38:27 +0100
Turgut Uyar said:
> I use PythonPoint for my lectures at the Istanbul Technical University,
> Computer Engineering Department. I needed some features (most of all,
> support for Turkish), so I've hacked the code a bit and implemented
> them. The major ones are:
>
> - native language support through utf-8 encoded source files and ttf
> fonts
> - effect attributes on paragraphs, images, tables, lines, rectangles
> etc.
>
> I've also made some minor bugfixes. The resulting patch is at:
> http://www.cs.itu.edu.tr/~uyar/reportlab_1.14-pythonpoint.patch
>
> The patch also includes a sample file (htu.xml) that demonstrates the
> new features. The PDF produced from that file can be viewed at:
> http://www.cs.itu.edu.tr/~uyar/htu.pdf
Turgut,
Thanks for submitting this patch. The new features look like they'd be
pretty useful.
I tried patching the current pythonpoint, but you appear to have done the
diff from an old version.
I tried fixing it up manually but ran into problems (specifically that the
patched pythonpoint wouldn't handle your htu.xml file).
Could you either
a) send us a patch off the current pythontpoint, or
b) figure out what is happening from the traceback I get when trying to use
your patched pythoinpoint.
Thanks.
John
--- traceback from patched pythoinpoint starts here ---
C:\code\reportlab\tools\pythonpoint>pythonpoint.py htu.xml
Traceback (most recent call last):
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 1071, in ?
main()
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 1066, in
main
process(file, notes, handout, printout, cols, verbose,
options['outDir'])
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 942, in
process
return _process(rawdata, datafilename, notes, printout, handout, cols,
verbose, outDir)
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 962, in
_process
pdfcontent = pres.save()
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 440, in
save
return self.saveAsPresentation()
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 379, in
saveAs
Presentation
slide.drawOn(canv)
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 551, in
drawOn
frame.drawOn(canv)
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 580, in
drawOn
story.append(thingy.getFlowable())
File "c:\code\reportlab\tools\pythonpoint\pythonpoint.py", line 595, in
getFlowable
self.bulletText
File "c:\code\reportlab\platypus\paragraph.py", line 341, in __init__
self._setup(text, style, bulletText, frags, cleanBlockQuotedText)
File "c:\code\reportlab\platypus\paragraph.py", line 363, in _setup
style, frags, bulletTextFrags = _parser.parse(text,style)
File "c:\code\reportlab\platypus\paraparser.py", line 503, in parse
self.feed(text)
File "c:\code\reportlab\platypus\paraparser.py", line 474, in handle_data
x = frag.fontName = tt2ps(frag.fontName,frag.bold,frag.italic)
File "c:\code\reportlab\lib\fonts.py", line 74, in tt2ps
fn, b1, i1 = ps2tt(K[0])
File "c:\code\reportlab\lib\fonts.py", line 66, in ps2tt
raise ValueError, "Can't map PS font %s" % psfn
ValueError: Can't map PS font verdana
--- traceback from patched pythoinpoint ends here ---
--
John Precedo (johnp@reportlab.com) Developer
Reportlab Europe Ltd (http://www.reportlab.com)