[reportlab-users] PNG to PDF
Dinu Gherman
gherman at darwin.in-berlin.de
Tue Apr 3 17:49:15 EDT 2007
Tim Roberts:
> This is an interesting request. There's no way to *convert* a PNG to
> PDF. You can *embed* a bitmap into a PDF, and ReportLab can do that in
> a half-dozen lines of code, but it's not "converted" in any way.
Well, since you can get the PNG out of the PDF again, one might
call this a lossless conversion between different formats. But,
yes, I feel like PDF is used here as a container format, like
Quicktime, say, or tar.
BTW, the inverse operation (PDF to PNG) is more interesting.
See a code snippet of mine doing something very similar here
converting (?!) to TIFF on OS X:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/223320
Dinu
--
Dinu C. Gherman
......................................................................
I love my Mac. I just wish it came in green! - www.greenmyapple.com
More information about the reportlab-users
mailing list