Re: extracting part of a PDF image
Re: extracting part of a PDF image
- Subject: Re: extracting part of a PDF image
- From: Marcel Weiher <email@hidden>
- Date: Tue, 12 Nov 2002 01:42:24 +0100
On Monday, November 11, 2002, at 10:15 Uhr, Seungoh Ryu wrote:
Does anyone know how to extract a part (say, top quarter of the entire
image) of a PDF image from an NSPDFImageRep inited with content of a
PDF file?
If you don't care about redundant data in your file, you can just clip
it away and draw. If you really want to extract parts of the PDF file,
you will need a PDF processing library.
<shameless plug>
Not entirely coincidentally, I happen to have fully Cocoa Postscript
and PDF processing frameworks. They are not free ;-)
</shameless plug>
Simply drawing (or compositing) part of it onto another image seems to
give just a bitmap rep from the cached image and is huge in size (100s
kb opposed to 10 kb of the original PDF file in entirety!)
An image you draw into is always a bitmap. Just set up the clip and
then draw to your final destination graphcs context (don't cache
intermediate results in an image).
Regards,
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.