This is Illustrator CS5. I'm trying to export to PNG, but I keep getting a black border on two edges of the final image.

I know the usual issue is the alignment of the object on the artboard but Illustrator refuses to align my object with the artboard correctly. My artboard is set to top left position, x=0 y=0, w=512, h=512.

My object is the same exact size, but if I set it to x=0 y=0 Illustrator moves it back again, to either 0.5px or -0.5px. This obviously causes the bug with the exported PNG. This doesn't work for me with either Export or Save for Web & Devices.

enter image description here

How do I solve this? Is this a bug? Do I need to make the object 1px bigger than the artboard every time, just to get around this?

  • 1
    Do you have it set to Align to Pixel Grid?
    – JohnB
    Nov 5, 2019 at 20:32
  • @JohnB Yep. If you post as an answer, I can accept.
    – BadHorsie
    Nov 5, 2019 at 22:51
  • I already mentioned Snap to Pixel in my answer ...
    – Wolff
    Nov 5, 2019 at 22:59
  • @Wolff Is that the same as Align to Pixel Grid, in the Transform tab? I had to turn it off there. I had no snap options enabled in the View menu.
    – BadHorsie
    Nov 5, 2019 at 23:02
  • 3
    Does this answer your question? Illustrator CC: Turn off align objects to pixel grid
    – BadHorsie
    Jan 2, 2020 at 15:23

3 Answers 3


I know this is an old post and the issue might already be resolved. I'm replying because I ran into a similar problem today and found a workaround. Maybe this will be useful for someone else, for I wasted a couple of hours because of it.

I'm working on something which requires me to be able to exactly overlap and align rectangles to each other, should be pretty easy, right? Unfortunately I also found that, like you posed, Illustrator kept placing/moving them by a .5 pixel increment. Also with creating them, I could already see the placement preview snap to strange, half-stepped increments, as is visible here: Off-set position preview

Similar to dragging to create a new shape. It placed the shape at a .5px offset: Off-set drawn shape

I initially thought this was a bug too. What solved it for me was the Stroke panel of all places: When drawing shapes with the Stroke set to Align Stroke to Center option active (defaulted to a 1pt wide strokeweight) the offset occurs. When it's set to either Align Stroke to Outside or Inside this offset disappears. Centered line -> OffsetAligned to Outside line -> No offset!

Hope this helps!


The only explanation I can come with is related to Snapping, Grids and Rulers.

The unexpected behavior could come from a combination of several things:

  • You have turned on Snap to Grid.
  • You have turned on Snap to Pixel.
  • Your grid has unwanted settings. Check Edit > Preferences > Grid and see if Gridline every and Subdivisions is set to what you want.

  • You have accidentally moved the origin of your document to maybe [-0.5, -0.5]. Move it back to the upper left corner of the artboard by dragging from the intersection of the two axes.

  • I don't have any snap on. I dragged the document origin back to the corner of the artboard. I have noticed that my object will always adjust itself an extra -0.5 on the X axis, and +0.5 on the Y axis, whether I drag it with the mouse, move it with the keyboard arrows, or enter a number myself. So if I tell it to move to 4px it will change the number itself to 3.5.
    – BadHorsie
    Nov 5, 2019 at 22:42
  • Does this happen with every object? Does it also happen in a new document?
    – Wolff
    Nov 5, 2019 at 22:53

Change the stroke size (temporarily)to 0.25pt or 2 pt. As far as I understand, the logic of Illustrator is to snap-to-pixel in the way, that the outline your stroke is aligned to the pixel grid. If a 1px-line is aligned to to natural number x-value, the border of this line ends on the +/-0.5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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