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:

const inputFilePath = `c:/sample.docx`;
const merger = new groupdocs.merger.Merger(inputFilePath);
const outputPath = `c:/output/result.docx`;
const orientationMode = groupdocs.merger.OrientationMode.Landscape;
const orientationOptions = new groupdocs.merger.OrientationOptions(orientationMode, 1, 2);
merger.changeOrientation(orientationOptions);
merger.save(outputPath);