[reportlab-users] Embedding EPS content.

David M. Wilson reportlab-users@reportlab.com
Mon, 1 Dec 2003 23:07:37 +0000


On Mon, Dec 01, 2003 at 10:02:46PM -0000, Andy Robinson wrote:

> Non-trivial.  EPS is a 'big' standard; you'd get a long way with
> simple files by translating all the postscript operators to PDF ones
> ('moveto' -> 'm'), but since PS is a language and can define
> subroutines and PDF can't, you need a Postscript interpreter to handle
> the general case.

Ah.. the misconceptions of the ignorant. :)

I see now why my silly addLiteral hacks were failing. I was under the
impression that PDF was essentially a standardised framework for
compressing/encrypting what was otherwise EPS.


> If your EPS files contain embedded TIFF previews, then ripping those
> out and including them with PIL may be possible, but it's cheating -
> you would only get a low-resolution image and lose all the vector
> info.

It's completely awful. :)  My goal here is to preserve the vector
drawing commands so I get nice high-res output on target printers at a
very small file size.


> Are you starting with EPS files you need to process, or trying to
> select a way to create artwork? SVG and Adobe Illustrator (AI) files
> would be way easier to work with..

The EPS starts life as a CorelDraw! document which I have access to. I'd
be interested in hearing of any ways (via other packages if necessary)
to convert the Corel document into a format which I could include into a
ReportLab-generated PDF.

Apart from the Canvas drawing commands, are there any other ways of
outputting pre-canned vector content into the target PDF? Please excuse
my ignorance - I have been using the product for less than 48 hours.

I can say ahead of schedule that I am going to really enjoy working with
ReportLab - it is everything I have come to expect from a well written
Python application: readability, documentation, simplicity, etc., etc..

Keep up the good work! Thanks,


David.