PDF support is actually there with the standard image importer (at least in 10.5 - not got access to any 10.4 systems to see if it works), it's just... disabled? Anyway, I've used it previously - it just needs a little hacking. To use it you need a hex editor, so it's not for the faint hearted :) (Or maybe it's possible without, but that's how I did it. This might be of interest to you Chris - enabling the existing functionality will probably be easier than making it from scratch.

To do it:
Use an image importer patch, and load any random image in. Save the composition and quit. Load up your PDF file in a hex editor, select everything (usually command-A) and copy it. Rename your .qtz file to .plist, and open it so it loads in the plist editor. Find your image loader patch in the plist, and find the Data element. It currently holds the image you loaded. Delete the data inside the brackets in the data (if I remember right, you delete everything inside the <> brackets) and replace it with the data copied from the pdf file.
Save, and rename back to .qtz and you're done.

A few notes: the pdf seems to be treated as an image source instead of an image, so if you resize it, it will get redrawn rather than just scaling. That means the image always stays nice and sharp. But it's slow, especially with complex images - fine for loading in preview, not fine if you want to zoom in + out smoothly.

Good luck if you decide to do it that way.

Chris Wood


On 17 Jul 2008, at 20:29, Christopher Wright wrote:

Thanks for the pointer. That works nicely with some filetypes, but it just stops my composition dead in its tracks when using PDFs. Is that a known
limitation?
How did people avoid this loading issue with QC2 other than your custom patch? Perhaps some sort of delay, or loading into an off-screen sprite?

Not sure if it's known or not -- we jettisoned 10.4 long ago, and haven't really spent much time looking back :)

There weren't really any other good solutions that I recall -- you could hard-code a delay, but that's not always reliable. You can also drag images into the editor, and get static copies (no async loading). This isn't helpful if you're using external images though (or images that you don't want to bundle in).

Off-screen sprite would probably work -- you'd need some simple logic to do the right things when it's loaded, but that shouldn't be too difficult.

If you'd like PDF support, I could try and take a look, depending on your timeframe. PM me and we can discuss that further. :)

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/psonice%40gmail.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to