- Select a portion of a pdf file in Preview.app and copy to the clipboard,
- Paste in Mathematica.
This results in the whole pdf page being pasted in Mathematica. Researching
on the web showed that this same behaviour was observed with Keynote at some
point but it has since been fixed.
It has to do with a new so-called "non-destructive" way that Preview now
uses for cropping. The application where the pasting is done needs to be
made aware of this change on the part of Apple. Thus, on my 10.5.6 system,
pasting works well with Pages and Keynote (iWork 9).
A workaround is to paste in one of these applications, copy the pdf image
and paste it in Mathematica. This works as expected.
Regards,
A.B.
A.B.
Hi,
the problem is that the CropBox is being ignored by Mathematica.
Perhaps the easiest workaround for this issue is to replace Preview
with the free PDF reader and annotation application Skim (http://skim-
app.sourceforge.net/). Copying from Skim to Mathematica works fine
because it puts the crop information into the MediaBox dimensions.
Another possibility, if you want to keep using Preview (e.g., because
it's more versatile with non-PDF formats), would be based on a script
I wrote last year, precisely for this purpose in conjunction with the
earlier versions of Keynote. I now slightly modified my script to
change the MediaBox as required by Mathematica, and I've posted it as
an AppleScript bundle in the file clipPDF-noGS-1.2.zip which can be
downloaded at
http://www.uoregon.edu/~noeckel/PreviewLeopard.html#nogsMediaBox
You would then copy a selection in Preview as usual, but before
pasting into Mathematica invoke this script from the script menu bar.
It directly modifies the current PDF clipboard contents, so that only
cropped part of the PDF appears when you subsequently paste into
Mathematica.
To install this script, just follow the instructions in the
accompanying README file (there's no need for any additional
downloads).
Regards,
Jens
This is a previously unreported bug in Mathematica that has since been
fixed for a future release.
In the future I encourage you to report any suspected bugs in
Mathematica to Wolfram Tech Support: http://support.wolfram.com/submitabug.=
cgi
-Rob, Wolfram Research
I've added a bug report for a related problem, not knowing if it has
been fixed for versions > 7.0.0:
When pasting a PDF page into Mathematica's notebook, the resolution of
the pasted cell does not adjust itself to the View magnification of
the notebook.
Example:
(a)
set Window>Magnification > 200%
(b)
paste a PDF containing resolution-independent vector graphics (fonts)
into this notebook
The display appears coarse and pixelated. It is possible to resize the
pasted image, but the result looks smooth only when the notebook
magnification is set to 100%.
Jens