Printing, Postscript and custom papersize

I am writing an application that prints a document to a postscript file on
disk.  I need to write this document to the postscript such that the
document completely fills out the entire page it is written on (without
resizing the document contents).  The reason is that this file is to be
converted to Encapsulated Postscript (EPS) for use in a news paper and then
the papersize must be the same size as the article on the paper (with images
and stuff). I have tried to do this by calling the DocumentProperties
procedure and changing the properties of the DEVMODE variable for the
printer but the document stays the same anyway.

Does anybody know how to do this properly?

Per (Norway)

(remove the nospam section of my email address in order to mail me)