Setting orientation of Presentation to Landscape or Portrait using Java APIS

How can you set the orientation of the Presentation to Landscape or Portrait using Java the Java apis. I know it can be done using the apis for the pdf.

Thanks In Advance

Please check this topic