Re: Using CALayer to display a PDF ?

2025-01-04 Thread Alex Zavatone via Cocoa-dev
Oh, I forgot to ask. Are you doing this on the Mac or on iOS? My writeup is from an iOS perspective. See? I told you. No coffee this morning Hope it helps to guide you in the right direction in any case. Alex Zavatone > On Jan 4, 2025, at 6:30 AM, Gabriel Zachmann via Cocoa-dev > wrote:

Re: Using CALayer to display a PDF ?

2025-01-04 Thread Alex Zavatone via Cocoa-dev
That’s not what CALayer does. It would help to think of how to display a PNG or JPEG image first - noting that a PDF file is more complicated than that. You’d use a UIImage. Think of it like this. A UIImage is the internal structure of an image or and image document. Think of it as a Photosho

Re: Using CALayer to display a PDF ?

2025-01-04 Thread James Walker via Cocoa-dev
On 1/4/25 4:30 AM, Gabriel Zachmann via Cocoa-dev wrote: I am using CALayer's to display images with some animations. Now, I would like to display PDFs (just the first page). Could some kind soul please explain to me how to load PDFs? And would I then just add such a PDF object as layer.conten

Using CALayer to display a PDF ?

2025-01-04 Thread Gabriel Zachmann via Cocoa-dev
I am using CALayer's to display images with some animations. Now, I would like to display PDFs (just the first page). Could some kind soul please explain to me how to load PDFs? And would I then just add such a PDF object as layer.contents ? All hints will be highly appreciated. Best regards,