View as MarkdownMarkdown
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:
String filePath = "c:\sample.docx";
String filePathOut = "c:\output\result.docx";
OrientationOptions orientationOptions = new OrientationOptions(OrientationMode.Landscape, new int[] { 3, 4 });
Merger merger = new Merger(filePath);
merger.changeOrientation(orientationOptions);
merger.save(filePathOut);
We value your opinion. Your feedback will help us improve our documentation.