[OS X TeX] Shadows of pdf in Keynote

Martin Costabel costabel at wanadoo.fr
Sat Apr 5 11:52:03 EDT 2008


Jens Noeckel wrote:
[]
>>> Chris Goedde wrote:
>>> []
>>>> Keynote 3 is broken, though, it doesn't correctly recognize the 
>>>> cropping of pdf's done in Preview (don't know if that's different in 
>>>> Keynote 4).

> reading this, I tried it out on my Leopard machine, with Keynote 3 (I 
> have Keynote 4 on a Tiger machine that I use predominantly). And of 
> course, as Martin said, the copying from Preview is totally messed up.

Jens' python script using ghostscript works indeed.

I had a look inside the pdf files and I think I found the point where 
things go wrong. It is in fact an ugly conspiracy between Leopard's 
Preview and Keynote, and both are to blame. Here is the story:

The select tool in Preview introduces some additional dimensions into 
the document. The page size is always described by /MediaBox, and the 
select tool introduces /CropBox, which corresponds to the dimensions of 
the selected area. Then there are sometimes /BleedBox and /TrimBox which 
  are unimportant. However, Leopard's Preview introduces additionally 
/ArtBox and this is where things go wrong. It sets the /ArtBox 
dimensions to the page size, and Keynote wrongly uses /ArtBox instead of 
/CropBox to decide which part of the copied pdf to show.

The workaround is to remove the /ArtBox definition from the pdf that 
will be pasted, or to set the /ArtBox dimensions to those of /CropBox. 
Running Jens' gs script removes /ArtBox (In addition, the script says 
some other rather unfriendly things about the correctness of Apple's 
idea of pdf specs.)

BTW, copy-paste from TeXShop does not introduce any of these /CropBox or 
/ArtBox definitions.

-- 
Martin






More information about the MacOSX-TeX mailing list