[reportlab-users] PythonPoint - New features
reportlab-users@reportlab.com
reportlab-users@reportlab.com
Tue, 3 Sep 2002 20:46:21 +0300 (EEST)
>>
>> 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.
>
Right, I've noticed the newer version after I've sent the patch. Now I
have created a patch against ReportLab 1.15 and put it at:
http://www.cs.itu.edu.tr/~uyar/reportlab_1.15-pythonpoint.patch
> 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.
>
I tried the new patch and it works. I'm using python2 on a Linux machine
but I think there shouldn't be any difference for Windows. Just make sure
that all 4 verdana font files are placed under reportlab/fonts (verdana,
verdanai, verdanab and verdanaz).
I have a student who is working on creating a GUI for producing the
pythonpoint source file. She worked with mod_python until now but I think
we'll move to TkInter or PyQt or code it as a Zope product. Don't hold
your breath, though, it should take quite a while :-)
-- Turgut
> 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)