# Image of input and output cells is not exported correctly

Wolfram Blog uses PNG images to display input and output cells in a notebook. For example, the following is an image from Samuel Chen's post:

I should be able to produce a similar image by selecting a group of cells and selecting File -> Save Selection from the pull-down menu. When I tried that on the cell

In[1]:= Series[Log[1+x],{x,0,6}]
Out[1]= x-x^2/2+x^3/3-x^4/4+x^5/5-x^6/6+O[x]^7


I get the garbled image

This does not happen when I save selection to PDF or BMP. In the case of BMP, the In[1] and Out[1] goes missing:

Do you know of a way to fix the problem with PNG export and/or include the In[1] in BMP export? I am running Mathematica 8.0.4.0 on Linux x86 (64-bit), which I think is part of the problem.

-
How do you know they didn't take a screenshot? – rm -rf Jun 3 '12 at 7:17
This works correctly for me with v7 on Win7: i.stack.imgur.com/dzJJ1.png – Mr.Wizard Jun 3 '12 at 7:21
Since I am not seeing this problem, please check your setting for "PageWidth" in the Option Inspector, especially the one for ExportMultipleCellsOptions. Mine is set for Infinity. – Mr.Wizard Jun 3 '12 at 7:26
@Mr.Wizard The image Szabolcs's uploader produces looks great: i.stack.imgur.com/jRg2e.png. I will look at his code. Thanks! – Michael Wijaya Jun 3 '12 at 7:38
I ran into a similar problem when making the uploader. The system was using the palette's width to rasterize the selection, not the width of the notebook where the expression was. It's still not completely clear to me how the width is determined. You can google this site for ExportPacket and see this too for some hints. ("The front end can be unpredictable about what line width it uses to compute breaks, so it is usually wise to specify an explicit value for the PageWidth option." – Szabolcs Jun 3 '12 at 8:18