Message Boards Message Boards

0
|
4822 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

PDF Export gives a much bigger file in Mathematica 9

Posted 11 years ago
Okay. I am pretty convinced that exporting PDFs via export command is horribly broken in Mathematica 9.
 Show[Plot[x^(1/2), {x, 0, 10}, PlotRange -> {{-0.4, 10}, {-0.35, 4}},
   PlotStyle -> {Thick}, Ticks -> {{0}, {0}},
   AxesLabel -> {Style["l", FontSize -> 14],
     Style["\!\(\*SuperscriptBox[\(f\), \(T\)]\)", FontSize -> 14]}],
  Plot[(2^(1/2) x)/4 + 2^(1/2)/2, {x, 0, 10},
   PlotRange -> {{0, 10}, {0, 4}}, PlotStyle -> {Red},
   Ticks -> {{0, 2, 4, 6, 8, 10}, {1, 2, 4}}],
  Plot[(6^(1/2) x)/12 + 6^(1/2)/2, {x, 0, 10},
   PlotRange -> {{0, 10}, {0, 4}}, PlotStyle -> {Purple},
  Ticks -> {{0, 2, 4, 6, 8, 10}, {1, 2, 4}}],
ListLinePlot[{{2, 2^(1/2)}, {2, 0}},
  PlotRange -> {{-0.5, 5.5}, {-1, 10}},
  Ticks -> {{0, 1, 2, 3, 4, 5}, {0, 5, 10}},
  PlotStyle -> {Black, Dashed}],
ListLinePlot[{{6, 6^(1/2)}, {6, 0}},
  PlotRange -> {{-0.5, 5.5}, {-1, 10}},
  Ticks -> {{0, 1, 2, 3, 4, 5}, {0, 5, 10}},
  PlotStyle -> {Black, Dashed}],
Graphics[Text[
   Style["\!\(\*SubscriptBox[\(l\), \(old\)]\)", Black, Bold,
    Larger], {2, -0.15}]],
Graphics[
  Text[Style["\!\(\*SubscriptBox[\(l\), \(new\)]\)", Black, Bold,
    Larger], {6, -0.15}]]]

Export["figure11.pdf", %, "AllowRasterization" -> True,
ImageSize -> 360, ImageResolution -> 600]

The above code produces a 5KB PDF when run in Mathematica 8.04. The same code produces a 2.9MB PDF file when run in Mathematica 9.01. Both PDFs look exactly the same.
POSTED BY: Burak
Please see  how-can-i-save-as-pdf-without-file-size-getting-too-large
and follow the link for a solution by Szabolcs there on settings needed in Options Inspector .

It seems that previous versions of Mathematica did not embed these fonts by default, but version 9 does. There are two relevant Front End options controlling front embedding:

    EmbedExternalFonts
    EmbedStandardPostScriptFonts
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract