Example #1
0
        void RunTest()
        {
            var core = new MakePdfCore(null);

            var files = new List <string>()
            {
                Path.GetFullPath(@"TestData\word1.docx"),
                Path.GetFullPath(@"TestData\word2.doc"),
                Path.GetFullPath(@"TestData\pdf1.pdf"),
            };

            // Setting
            var setting = new Setting();

            setting.AddFileNameToBookmark.IsEnabled = true;
            //core.Setting.AddFilenameToBookmark.Exclude = "MakePdfTest1.*";
            setting.ReplaceFileName.IsEnabled = false;
            setting.ReplaceFileName.Before    = "MakePdf(.*)\\..*";
            setting.ReplaceFileName.After     = "$1";
            setting.Property.Title            = "Title Test";

            core.RunAsync(files, fixture.OutputFile, setting).Wait();

            Assert.True(File.Exists(fixture.OutputFile));
        }
Example #2
0
 public Runner(MakePdfCore core)
 {
     this.core        = core;
     core.Subscriber += x => Messenger.Instance[MessengerType.Processing].GetEvent <PubSubEvent <Message> >().Publish(x);
 }