I think in this context gerund phrase " Having your advertisement printed on newspapers " is the subject of the sentence, and it has the same meaning as " Asking your advertisement to be printed on newspapers" . If your drop "having " it may catch people's drift in spoken English, but not in written English. And the context mentioned above , in my mind , is written English.