Change Paper Size

Is there a way to change the paper size by script? I need to print some documents in a particular paper size.

Thanks in Advance

Nina.