[reportlab-users] ANN: pdfnup 0.3.0
Luc Saffre
luc.saffre at gmx.net
Mon Dec 22 09:47:17 EST 2008
On 22.12.2008 13:27, Dinu Gherman wrote:
>
> sure, use the patch I've sent you on Dec, 12th via private
> email.
Oho? No, it seems that I didn't receive this message? Maybe you can send
it again to my private e-mail?
> If you didn't receive it, please find it below.
> $ diff -u pdfnup.py pdfnupX.py
> --- pdfnup.py 2008-11-17 13:26:02.000000000 +0100
> +++ pdfnupX.py 2008-12-19 11:02:25.000000000 +0100
> @@ -281,7 +281,10 @@
> page2Content.operations.insert(0, [[], "q"])
>
> # handle rotation
> - rotation = page2["/Rotate"].getObject()
> + try:
> + rotation = page2["/Rotate"].getObject()
> + except:
> + rotation = 0
> if rotation in (180, 270):
> dw, dh = destWidth, destHeight
> arr = [-xScale, 0, 0, -yScale, destX+dw, destY+dh]
That's fine, now it works. I'd suggest that you write "except KeyError:"
instead of "except:" because if something else happens during
getObject() this will be hard to track.
Luc
More information about the reportlab-users
mailing list