Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Printing and Exporting graphics images from Mathematica 6 to PDF?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91252] Re: Printing and Exporting graphics images from Mathematica 6 to PDF?
  • From: ragfield <ragfield at gmail.com>
  • Date: Mon, 11 Aug 2008 06:08:07 -0400 (EDT)
  • References: <g6uch9$pda$1@smc.vnet.net> <g71248$o8k$1@smc.vnet.net>

On Aug 10, 12:54 am, AES <sieg... at stanford.edu> wrote:
> The following quote appears in a recent post to this group:
>
> > > File > Print Selection > Save As PDF causes the graphic to be
> > > rasterized.  This is why it displays so much quicker in the viewer
> > > application.  You can get the same behavior from File > Save Select=
ion
> > > As > PDF by clicking on the Options button in the Save As dialog and
> > > setting Graphics Containing Smooth Shading > Use Bitmap
> > > Representation.
>
> > > Unfortunately, this results in a larger file size because of a
> > > limitation of Mathematica 6 where it does not compress exported
> > > bitmaps.  This limitation has been removed for a future release.
>
> > > -Rob
> > > Wolfram Research
>
> As best I can tell these statements are not correct, or at least do not
> apply directly, for Mathematica 6 on Macs.  Is this statement limited t=
o other
> non-Mac platforms?

These statements compare the behavior of PDF export when using the Mac
OS X PDF printing support (from File > Print [Selection] > Save As
PDF, which is only available on Mac) to Mathematica's built in PDF
export (from File > Save [Selection] As > PDF or Export[_, _, "PDF"],
which is available on all platforms).

> And some related questions:
>
> 1)  Following the most straightforward Print Selection to PDF procedure=
s
> on a Mac seems to produce a vector graphics file

Mathematica will create a vector graphics file wherever possible.  The
only time the graphics will be rasterized is when they contain smooth
shading (VertexColors/VertexNormals) AND the "Graphics Containing
Smooth Shading" option I mentioned earlier is set to "Use Bitmap
Representation."

> in which all the text
> has been converted into outline form, which means it can no longer be
> readily edited in Illustrator.  

Mathematica does this for spanning characters which cannot be
represented as standard glyphs from any font.  Mathematica does not do
this for any other text.  Are you perhaps testing this theory using
Mathematica's PDF Import[] (because PDF import currently *does*
convert text to outlines) or some other application?

> Is there a way to prevent this behavior, and keep all the text as
> characters in embedded fonts, so that one can edit the text, make font
> changes, change font sizes, and the like?

This should just work.  If it doesn't it would be a bug and should be
reported to Wolfram Research with a specific reproducible example.

> 2)  Following the alternative chain of steps involved in Save Selection
> to PDF (again, on a Mac) leads one to a menu of options that includes
> choosing between "Highest Quality Vector Representation" and "Most
> Compatible Vector Representation".  What do these terms mean?  
>
> [Or is this a Mac OS X question rather than an Matheamtica question?  I=
t's not
> clear to me whether the dialog box that presents these options is a Mac
> OS dialog box or an Mathematica 6 dialog box . . . ]

These settings apply to all platforms.  See this earlier message and
read below:

http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread=
/thread/a669fd00915cbbf5/6b0387ea4f8732d4?#6b0387ea4f8732d4

> 3)  More broadly, if one's overall objective is to routinely transfer
> Mathematica 6-generated graphics from Mathematica 6 notebooks into vector=
 graphics PDF files
> on a Mac HD, such that the resulting PDF files will be:
>
>    *  Of primary concern, "most fully and readily editable" in
>       some other graphic application such as Illustrator, and
>
>    *  Of secondary importance, not excessively large in file size,
>
> what is the _best_ way to do this in Mathematica 6, on a Mac?

The problem is, there is not a *best* way to do this.  Arbitrary
Mathematica 6 graphics can contain features which are not supported by
the PDF vector graphics format.  There is not one setting that will
give you exactly what you want in all cases.  You have to decide which
criteria are the most important to you for a given graphic.  If the
graphic contains smooth shading (as graphics created by most 3D and
some 2D visualization functions do), use one of the following
settings.  Each has advantages and disadvantages.

* Use Bitmap Representation.  The graphic to look *exactly* identical
to how it looks on screen in Mathematica.  It will open quickly in
viewer applications.  The file size may be large (particularly in
6.0.x).  Printing may take a long time due to large size.  Use the
bitmap resolution option to fine tune the file size vs. image quality
issue.  If the PDF is only ever intended to be viewed, you can use
screen resolution for the bitmap (72 or "Screen").  If it is intended
for print you might want something higher like 300 or 600.

* Use Highest Quality Vector Representation.  The graphic will look
very close to how it looks on screen in Mathematica.  It will be
editable by applications such as Illustrator.  The file size may be
slightly large.  The graphic will likely take a long time to load in a
viewer application.  Not all viewer applications support these
features (notably Preview.app prior to Mac OS X 10.5) so they may
appear blank.

* Use Most Compatible Vector Representation.  The graphic will look
approximately (but not exactly) how it looks on screen in
Mathematica.  The file size will be relatively small.  It will be
editable by applications such as Illustrator.

The other alternative is to change your graphics using various options
to the plotting functions.  There are certain combinations of options
that will produce graphics that, when exported to PDF, are editable
and look the same as in Mathematica.  Unfortunately, this typically
means losing lots of neat version 6 plotting features.  Here's an
example:

Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, MaxRecursion -> 0,
 PlotPoints -> 20, Mesh -> Full, NormalsFunction -> None]

-Rob
Wolfram Research


  • Prev by Date: Re: Solving nonlinear inequality constraints
  • Next by Date: mixed partial derivatives
  • Previous by thread: Re: Printing and Exporting graphics images from Mathematica 6 to PDF?
  • Next by thread: Re: Printing and Exporting graphics images from Mathematica 6 to PDF?