Re: PDF rendering & black background?
Re: PDF rendering & black background?
- Subject: Re: PDF rendering & black background?
- From: Brian Webster <email@hidden>
- Date: Tue, 17 Jul 2001 13:30:52 -0500
on 7/17/01 11:37 AM, email@hidden at
email@hidden wrote:
>
I'm trying to display a PDF file(s) using an NSImage object and when
>
the image gets drawn via
>
>
[myNSImage drawInRect: destR fromRect: sourceR operation:
>
NSCompositeCopy: fraction: 1.0]
>
>
the entire background comes up black, except for places where there are
>
some line objects, etc. in the PDF doc. , they are displayed correctly
>
within their own bounds rects. I tried using XOR compositing but that of
>
course inverts the line obects etc. Is there some special setting(s) for
>
rendering PDF correctly ?
Try using NSCompositeSourceOver instead of NSCompositeCopy. That should
cause it to only render the PDF content where there is actually content, and
not render the background. At least, that's the way it works for TIFFs,
etc.
--
Brian Webster
email@hidden
http://www.owlnet.rice.edu/~bwebster/