Created
March 21, 2019 05:28
-
-
Save GroupDocsGists/778bb12890c352658adca5ab88855867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"; | |
int pageNumber = 4; | |
int newPageNumber = 2; | |
MoveOptions pageOptions = new MoveOptions(FileFormat.Vsdx, password, pageNumber, newPageNumber); | |
Stream openSourceFile = new FileStream(sourceFile, FileMode.Open); | |
DocumentResult result = new DocumentHandler().MovePage(openSourceFile, pageOptions); | |
//output file | |
var fileStream = File.Create(CommonUtilities.outputPath + "OutPut." + FileFormat.Vsdx); | |
Stream documentStream = result.Stream; | |
documentStream.CopyTo(fileStream); | |
documentStream.Close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment