Aspose.Words.Examples.CSharp.Rendering_and_Printing.LoadHyphenationDictionaryForLanguage.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:LoadHyphenationDictionaryForLanguage
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_RenderingAndPrinting(); 

            // Load the documents which store the shapes we want to render.
            Document doc = new Document(dataDir + "TestFile RenderShape.doc");
            Stream stream = File.OpenRead(dataDir + @"hyph_de_CH.dic");
            Hyphenation.RegisterDictionary("de-CH", stream);

            dataDir = dataDir + "LoadHyphenationDictionaryForLanguage_out.pdf";
            doc.Save(dataDir);
            // ExEnd:LoadHyphenationDictionaryForLanguage
            Console.WriteLine("\nHyphenation dictionary for special language loaded successfully.\nFile saved at " + dataDir);           
        }
        
LoadHyphenationDictionaryForLanguage