Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Can anyone see how to fix this text display? The example is from a larger project. I need to export the graphic at high resolution, but the text is going wrong.

text = StringTake[
   ExampleData[{"Text", "DonQuixoteIEnglish"}], {110600, 110914}];

a = Graphics[{{LightBlue, Rectangle[{0, -0.21}, {1, -0.04}]},
   Inset[Graphics[{{LightYellow, Rectangle[{0, 0}, {450, 40}]},
      Inset[
       TextCell[text, LineSpacing -> {0, 16}, TextJustification -> 1],
       Center, Center, {450, 40}]},
     BaseStyle -> {FontSize -> 12}, PlotRange -> {{0, 450}, {0, 40}}],
    {0.5, -0.155}, Center, {0.9, Automatic}]},
  PlotRange -> {{0, 1}, {-0.21, -0.04}}, ImageSize -> 600]

enter image description here

Rasterize[a, ImageResolution -> 300]

enter image description here

N.B. This problem is happening on Mathematica 7. I just checked on Mathematica 9 and it works ok, but I need to run it on version 7.

share|improve this question
    
in V9 Rasterize[a,ImageResolution->300] works fine (it gives the same image as your first one). –  kguler Dec 5 '12 at 12:15
    
@kguler - yes, thanks, I just tried. I need it for version 7 though. –  Chris Degnen Dec 5 '12 at 12:18
    
V8 works fine two. How about adding Rasterize[a, ImageResolution -> 300, ImageSize -> 600] –  s.s.o Dec 5 '12 at 12:18
    
@s.s.o. That works for the example, but when used in Export["a.png", a, ImageResolution -> 300, ImageSize -> 600] my output is not high resolution. It's the same as Export["a.png", a]. Thanks though. –  Chris Degnen Dec 5 '12 at 12:24
    
How about increasing the image resolution and setting image size in export rather than using default values. –  s.s.o Dec 5 '12 at 12:39
show 1 more comment

1 Answer 1

up vote 2 down vote accepted

Please try:

Rasterize[Magnify[a, 1], ImageResolution -> 300]
share|improve this answer
    
Could you explain why this helps/may help? Can't check for myself, as I don't have 7 installed. –  Sjoerd C. de Vries Dec 5 '12 at 14:09
    
@Mr.Wizard - Very nice. Thanks. It works for the final export too, with Export["a.png", Magnify[a, 1], ImageResolution -> 300] –  Chris Degnen Dec 5 '12 at 14:33
    
@Sjoerd I don't have an explanation, at least not right now. I only know that Magnify has helped in similar situations. Perhaps later I'll try to dig out why this helps, if the operations are not out of reach. Certainly magnification is entwined with ImageSize, etc. –  Mr.Wizard Dec 5 '12 at 15:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.