[reportlab-users] pb with images

Jerome Alet alet at librelogiciel.com
Wed Dec 14 08:22:32 EST 2005


Hi there,

while doing some work with my PDFMap utility,
I've noticed that when viewing the document with Acrobat
Reader 7.0 (Linux), I've got the message "Wrong operand type."
when I visualize the file in the case I represent some objects
with images.

NB : despite the presence of the error message dialog box, the 
document displays correctly on screen. The same document displays
without any error or warning in xpdf 3.01-3 (Debian)
Also I believe (not really sure) that the same document displayed OK 
without any warning in acroread 5.0 

If I linearize the code using the pycanvas framework included
in ReportLab, I've got a 54 Mb python program (>41000 lines long)
which in fact does (for each image) :

--- CUT ---        
# Saves context level 1 {'_mitreLimit': 0, '_leading': 14.4, '_textLineMatrix': (1.0, 0.0, 0.0, 1.0, 0.0, 0.0), '_fontsize': 12, '_horizScale': 100, '_fillMode': 0, '_lineJoin': 0, '_charSpace': 0, '_strokeColorRGB': (0, 0, 0), '_y': 0, '_x': 0, '_dynamicFont': 0, '_textMatrix': (1.0, 0.0, 0.0, 1.0, 0.0, 0.0), '_textRenderMode': 0, '_textMode': 0, '_lineCap': 0, '_lineDash': None, '_currentMatrix': (1.0, 0.0, 0.0, 1.0, 42.519685039370074, 42.519685039370074), '_fontname': 'Times-Roman', '_lineWidth': 0, '_fillColorRGB': (0, 0, 0), '_wordSpace': 0, '_rise': 0}
c.saveState()
c.translate(219.40376884083801, 529.37537249388242)
c.rotate(110)
c.linkURL('http://myserver.example.com/cgi-bin/myapp/myprog.py?action=Find&z=S15&n=3968&b=--', (-0.0, -0.0, 0.0, 0.0), relative=1)
c.drawImage('pictures/mypicture.jpeg', -0.0, -0.0, 0.0, 0.0, (255.0, 255.0, 255.0, 255.0, 255.0, 255.0))

# Restores context level 1 {'_mitreLimit': 0, '_leading': 14.4, '_textLineMatrix': (1.0, 0.0, 0.0, 1.0, 0.0, 0.0), '_fontsize': 12, '_horizScale': 100, '_fillMode': 0, '_lineJoin': 0, '_charSpace': 0, '_strokeColorRGB': (0, 0, 0), '_y': 0, '_x': 0, '_dynamicFont': 0, '_textMatrix': (1.0, 0.0, 0.0, 1.0, 0.0, 0.0), '_textRenderMode': 0, '_textMode': 0, '_lineCap': 0, '_lineDash': None, '_currentMatrix': (1.0, 0.0, 0.0, 1.0, 42.519685039370074, 42.519685039370074), '_fontname': 'Times-Roman', '_lineWidth': 0, '_fillColorRGB': (0, 0, 0), '_wordSpace': 0, '_rise': 0}
c.restoreState()
--- CUT ---        

The RL version I'm using is 1.20 from Debian.

Any idea what could be wrong ?

I can make the linearized program and the images available if needed.

thanks in advance for any help

bye

Jerome Alet


More information about the reportlab-users mailing list