예제 #1
0
 public static void TrySetLangAttribute(IAccessibleElement accessibleElement, String lang)
 {
     if (lang != null)
     {
         AccessibilityProperties properties = accessibleElement.GetAccessibilityProperties();
         if (properties.GetLanguage() == null)
         {
             properties.SetLanguage(lang);
         }
     }
 }
예제 #2
0
        public virtual void TagTreePointerTest08()
        {
            PdfWriter writer = new PdfWriter(destinationFolder + "tagTreePointerTest08.pdf").SetCompressionLevel(CompressionConstants
                                                                                                                 .NO_COMPRESSION);
            PdfDocument             document   = new PdfDocument(new PdfReader(sourceFolder + "taggedDocument2.pdf"), writer);
            TagTreePointer          pointer    = new TagTreePointer(document);
            AccessibilityProperties properties = pointer.MoveToKid(StandardRoles.DIV).GetProperties();
            String language = properties.GetLanguage();

            NUnit.Framework.Assert.AreEqual("en-Us", language);
            properties.SetLanguage("EN-GB");
            pointer.MoveToRoot().MoveToKid(2, StandardRoles.P).GetProperties().SetRole(StandardRoles.H6);
            document.Close();
            CompareResult("tagTreePointerTest08.pdf", "cmp_tagTreePointerTest08.pdf", "diff08_");
        }