Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //CreateResultFileTest();

            /*var converter = new ConverterFactory().CreateWcfConverterV1(new EndpointAddress("http://*****:*****@"d:\LO-PDF\test.txt", @"d:\LO-PDF\resume.pdf");*/

            //(new PrecizeSoft.IO.Tests.Converters.LOToPdfConverterTests()).ParallelTest(@"..\..\..\precizesoft-io\tests\samples\mini.docx", 100, 2, false);

            //ConvertBytesTest(@"d:\LO-PDF\resume.docx", @"d:\LO-PDF\resume.pdf");

            LOEnvironment.ConfigureFromRegistry();
            // LOEnvironment.ConfigureByUnoPath(@"D:\LibreOfficePortable\App\libreoffice\program");
            var factory = new ConverterFactory();
            //var converter = factory.CreateWcfConverterV1(new EndpointAddress("http://*****:*****@"resume.docx", @"resume.pdf");

            /*(new Task(() => { converter.Convert(@"d:\LO-PDF\resume.docx", @"d:\LO-PDF\resume.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume2.docx", @"d:\LO-PDF\resume2.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume3.docx", @"d:\LO-PDF\resume3.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume4.docx", @"d:\LO-PDF\resume4.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume5.docx", @"d:\LO-PDF\resume5.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume6.docx", @"d:\LO-PDF\resume6.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume7.docx", @"d:\LO-PDF\resume7.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume8.docx", @"d:\LO-PDF\resume8.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume9.docx", @"d:\LO-PDF\resume9.pdf"); })).Start();
             * (new Task(() => { converter.Convert(@"d:\LO-PDF\resume10.docx", @"d:\LO-PDF\resume10.pdf"); })).Start();*/
            Console.WriteLine("Finished");
            Console.ReadKey();
        }
 private static void ConfigureEnvironment(string libreOfficeUnoPath)
 {
     if (string.IsNullOrEmpty(libreOfficeUnoPath))
     {
         if (!LOComponentLoader.Instance.IsAvailable)
         {
             LOEnvironment.ConfigureFromRegistry();
         }
     }
     else
     {
         LOEnvironment.ConfigureByUnoPath(libreOfficeUnoPath);
     }
 }
Exemplo n.º 3
0
 public LOFixture()
 {
     LOEnvironment.ConfigureFromRegistry();
 }