471,330 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

dealing with emf/wmf files

I'd like to put some emf/wmf pictures into a pdf file
using 'reportlab', but the Python Imaging Library
cannot recognize emf files. The wmf files are said to
be 'identified only'.

Therefore, the following code does not work:

from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
width, height = letter # (595.27,841.89)
def hello(c):
c.drawImage(r'D:\01.wmf',1,1,height,width)

c = canvas.Canvas('hello.pdf',
pagesize=(height,width))
hello(c)
c.showPage()
c.save()

I do not want to convert the pictures into other
formats, e.g. jpg which will lower the quality.

Is there any way to get around with this problem?

Thanks!
Get news delivered with the All new Yahoo! Mail. Enjoy RSS feeds right on your Mail page. Start today at http://mrd.mail.yahoo.com/try_beta?.intl=ca
Jun 24 '07 #1
1 5183
Jackie Wang wrote:
I'd like to put some emf/wmf pictures into a pdf file
using 'reportlab', but the Python Imaging Library
cannot recognize emf files. The wmf files are said to
be 'identified only'.
libwmf (not for Python) can convert WMF (not EMF) to SVG or EPS.

http://wvware.sourceforge.net/libwmf.html
--
Michael Hoffman
Jun 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by paul | last post: by
5 posts views Thread by Tom Willis | last post: by
1 post views Thread by Bad_Kid | last post: by
1 post views Thread by Patrick | last post: by
3 posts views Thread by sebastian.harko | last post: by
2 posts views Thread by =?Utf-8?B?UnlhbiBBbmRydXM=?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.