On May 13, 2005, at 1:52 AM, Izidor Jerebic wrote:
On May 12, 2005, at 10:24 PM, Mike Lazear wrote:
We have one customer that was making use of EPS to place
drawings/images into word processing documents. Is there a way to
convert from a PDF file into an EPS file, or to directly create an
EPS file?
There is a simple way in Cocoa - NSView has method
-dataWithEPSInsideRect:, which can be used as this:
1. Create a subclass of NSView, which draws your PDF using
NSPDFImageRep in its drawRect: method, having view bounds same as PDF
size
2. Use [view dataWithEPSInsideRect:[view bounds]] to obtain EPS.
Note that this may have some problems if you use color blends and
transparency in PDF, but the output is quite ok in most cases.
If your app is not Cocoa, you could write a simple app that does this
transformation on files. It should take an hour or two for a Cocoa
guy....
izidor
Thanks for the great description. My application is Carbon and I'm
just barely into Cocoa (I'm only in Chapter 5 of Hillegass' book).
We don't use color blends or transparency. Our PDF files are fairly
straightforward. This sounds like a great way to accomplish what I
need and I really like the idea of it being a program that I control
rather than some general program like ghostscript that our users would
have to understand.
I'll try to write it but I know right up front it is going to take me
way more than two hours. =)
Thanks,
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden