Well, we already solve it.
The problem was simplier than we tought. We had a pdf file which is made with GReplay of various small graphs created with proc GSlide.
We defined correctly device = pdf for GReplay but we didnt define device for GSlide, so we put device=png at the beginning and it solves the problem.