Example #1
0
        public WordDocumentManipulator(string baseWordDocFilePath, string outputWordDocFilePath, bool overwriteExistingFile)
        {
            ExistingImageRelationshipIdCache = new Dictionary <string, string>();

            File.Copy(baseWordDocFilePath, outputWordDocFilePath, overwriteExistingFile);
            WordDocPackage = OpenEditableWordDocumentPackage(outputWordDocFilePath);

            NumberingManager = new WordDocumentNumberingManager(WordDocPackage.MainDocumentPart);
            StyleManager     = new WordDocumentStyleManager(WordDocPackage.MainDocumentPart.StyleDefinitionsPart);
            ElementCreator   = new WordDocumentElementCreator(NumberingManager, StyleManager);

            CleanupUnnecessaryElementsAsBaseFile(WordDocPackage);
        }
Example #2
0
 public WordDocumentElementCreator(WordDocumentNumberingManager numberingManager, WordDocumentStyleManager styleManager)
 {
     NumberingManager = numberingManager;
     StyleManager     = styleManager;
 }