Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// For complete examples and data files, please go to https://github.com/groupdocs-merger/GroupDocs.Merger-for-.NET
string sourceFile = CommonUtilities.sourcePath + fileName;
//Set password, as document is password protected
string password = "somepassword";
OrientationOptions pagesOptions = new OrientationOptions(OrientationMode.Landscape, FileFormat.Vsdx, password, new[] { 1, 2 });
Stream documentExample = new FileStream(sourceFile, FileMode.Open);
// Main method.
DocumentResult result = new DocumentHandler().ChangeOrientation(documentExample, pagesOptions);
Stream documentStream = result.Stream;
var fileStream = File.Create(CommonUtilities.outputPath + "OutPut." + result.FileFormat);
documentStream.CopyTo(fileStream);
documentStream.Close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.