# Upon PDF export, edgeless rectangles do not tile perfectly, and corners may be cut. Is this a bug?

Exporting the following as a PDF file

Graphics[{
{Red, Rectangle[{0, 0}, {1, 1}]},
{Green, Rectangle[{1, 0}, {2, 1}]}
}]


does not produce perfectly tiled rectangles, and some of the corners are cut too, as shown here:

and here:

Is this a bug?

I solve the problem by giving them some tiny edges:

Graphics[{
EdgeForm[{Red, Thickness[Tiny]}],
{Red, Rectangle[{0, 0}, {1, 1}]},
EdgeForm[{Green, Thickness[Tiny]}],
{Green, Rectangle[{1, 0}, {2, 1}]}
}]


The rectangles are slightly larger, and their sizes are slightly different; practically this isn't a problem. But is there a more elegant solution?

-
I believe that, yes, it is a bug--in the Mac OS Preview app, which employs a rather confusing interpolation algorithm to what is displayed. As I don't have a Mac, I can't confirm that this is definitely a duplicate of that question, but the PDF output (from version 8) is certainly correct for me on Windows when using SumatraPDF, Adobe Reader, and Acrobat Pro. –  Oleksandr R. Apr 25 at 18:02
The problem is still there in my Adobe Reader 10.1.6: see here. –  Taiki Apr 25 at 18:54
Hmm, I see. This problem seems to have appeared in version 9 or 9.0.1. Okay, looks like Mathematica's bug, then--especially considering its absence in previous versions. –  Oleksandr R. Apr 25 at 19:07
A workround is to export as EPS, then open EPS in Preview - seems to convert without that problem... –  cormullion Apr 25 at 19:16
Deleting the green square in Illustrator still leaves a slightly larger green frame: imgur.com/x0BNyO6 It would probably be good if you could report this to support@wolfram.com –  Szabolcs Apr 25 at 21:33