Your png file currently has the default height; you can specify it explicitly to make sure the whole table fits on the page.
library(gridExtra)
d <- head(iris, 50)
tb <- tableGrob(d)
h <- convertHeight(grobHeight(tb), "in", valueOnly=TRUE)
w <- convertWidth(grobWidth(tb), "in", valueOnly=TRUE)
png("iris.png", width = w, height = h, units = "in", res=300)
grid.draw(tb)
dev.off()
It's not perfectly accurate, for some reason, but it should help.