Filled rectangle

I'm trying to black out some areas of a PDF but always end up with a rectangle outline and no filling.
How can I black out a whole rectangular area?