Last active
March 21, 2019 08:06
-
-
Save GroupDocsGists/1db6771e3a1b9930667bd13e10a31034 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; | |
// Preparing. | |
string password = "SomePasswordString"; | |
int pageNumber1 = 1; | |
int pageNumber2 = 2; | |
SwapOptions pagesOptions = new SwapOptions(pageNumber2, pageNumber1, FileFormat.Vsdx, password); | |
Stream openFile = new FileStream(sourceFile, FileMode.Open); | |
// Main method. | |
DocumentResult result = new DocumentHandler().SwapPages(openFile, pagesOptions); | |
Stream documentStream = result.Stream; | |
var fileStream = File.Create(CommonUtilities.outputPath + "OutPut." + FileFormat.Vsdx); | |
documentStream.CopyTo(fileStream); | |
documentStream.Close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment