<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

using org.artofsolving.jodconverter;
using org.artofsolving.jodconverter.office;


namespace Sandwych.Reporting.JODConverterDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            //Make sure your LibreOffice/OpenOffice home is correct
            var officeHome = @"C:\LibreOffice3.5";

            var officePaths =
                Path.Combine(officeHome, "URE", "bin") + ";" + Path.Combine(officeHome, "program");
            var path = Environment.GetEnvironmentVariable("PATH");
            path += ";" + officePaths;
            Environment.SetEnvironmentVariable("PATH", path);

            var officeManager = new DefaultOfficeManagerConfiguration()
                .setOfficeHome(officeHome)
                .buildOfficeManager();

            officeManager.start();
            var converter = new OfficeDocumentConverter(officeManager);


            //Do some document converting job
            converter.convert(new java.io.File("demo.odt"), new java.io.File("test.pdf"));


            officeManager.stop();
            Console.ReadKey();
        }
    }
}<commit_msg>improve JODConvert Demo<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

using org.artofsolving.jodconverter;
using org.artofsolving.jodconverter.office;


namespace Sandwych.Reporting.JODConverterDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            //Make sure your LibreOffice/OpenOffice home is correct
            var officeHome = @"C:\LibreOffice3.5";

            var officePaths =
                Path.Combine(officeHome, "URE", "bin") + ";" + Path.Combine(officeHome, "program");
            var path = Environment.GetEnvironmentVariable("PATH");
            if (!path.EndsWith(";"))
            {
                path += ';';
            }
            path += officePaths;
            Environment.SetEnvironmentVariable("PATH", path);

            var officeManager = new DefaultOfficeManagerConfiguration()
                .setOfficeHome(officeHome)
                .buildOfficeManager();

            officeManager.start();
            var converter = new OfficeDocumentConverter(officeManager);

            //Do some document converting job
            converter.convert(new java.io.File("demo.odt"), new java.io.File("test.pdf"));

            officeManager.stop();
            Console.ReadKey();
        }
    }
}
{'fraction_non_alphanumeric': 0.10899922420480992, 'fraction_numerical': 0.0015515903801396431, 'mean_word_length': 2.235884567126725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4432379', 'n_tokens_mistral': 710, 'n_tokens_neox': 658, 'n_words': 141}