Example #1
0
        private PdfStructElem AddNewKid(String role)
        {
            PdfStructElem kid = new PdfStructElem(GetDocument(), PdfStructTreeRoot.ConvertRoleToPdfName(role));

            ProcessKidNamespace(kid);
            return(AddNewKid(kid));
        }
Example #2
0
        private PdfStructElem AddNewKid(AccessibilityProperties properties)
        {
            PdfStructElem kid = new PdfStructElem(GetDocument(), PdfStructTreeRoot.ConvertRoleToPdfName(properties.GetRole
                                                                                                            ()));

            AccessibilityPropertiesToStructElem.Apply(properties, kid);
            ProcessKidNamespace(kid);
            return(AddNewKid(kid));
        }
        internal RoleMappingResolverPdf2(String role, PdfNamespace @namespace, PdfDocument document)
        {
            this.currRole      = PdfStructTreeRoot.ConvertRoleToPdfName(role);
            this.currNamespace = @namespace;
            String        defaultNsName    = StandardNamespaces.GetDefault();
            PdfDictionary defaultNsRoleMap = document.GetStructTreeRoot().GetRoleMap();

            this.defaultNamespace = new PdfNamespace(defaultNsName).SetNamespaceRoleMap(defaultNsRoleMap);
            if (currNamespace == null)
            {
                currNamespace = defaultNamespace;
            }
        }
Example #4
0
 public override AccessibilityProperties SetRole(String role)
 {
     GetBackingElem().SetRole(PdfStructTreeRoot.ConvertRoleToPdfName(role));
     return(this);
 }
Example #5
0
 public override AccessibilityProperties SetPhoneticAlphabet(String phoneticAlphabet)
 {
     GetBackingElem().SetPhoneticAlphabet(PdfStructTreeRoot.ConvertRoleToPdfName(phoneticAlphabet));
     return(this);
 }
Example #6
0
 /// <summary>Sets new role to the current tag.</summary>
 /// <param name="role">new role to be set.</param>
 /// <returns>
 /// this
 /// <see cref="TagTreePointer"/>
 /// instance.
 /// </returns>
 public virtual iText.Kernel.Pdf.Tagutils.TagTreePointer SetRole(String role)
 {
     GetCurrentStructElem().SetRole(PdfStructTreeRoot.ConvertRoleToPdfName(role));
     return(this);
 }
 internal RoleMappingResolver(String role, PdfDocument document)
 {
     this.currRole = PdfStructTreeRoot.ConvertRoleToPdfName(role);
     this.roleMap  = document.GetStructTreeRoot().GetRoleMap();
 }