Change page orientation

GroupDocs.Merger allows to set Portrait or Landscape page orientation for specific or all document pages.

Here are the steps to change page orientation:

The following code sample demonstrates how to change page orientation:

with gm.Merger("c:/sample1.docx") as merger:
    orientation_mode = gm.domain.options.OrientationMode.LANDSCAPE
    orientation_options = gm.domain.options.OrientationOptions(orientation_mode, 1, 2)
    merger.change_orientation(orientation_options)
    merger.save("c:/merged.docx")