Пример #1
0
 internal virtual void EnsureNamespaceRegistered(PdfNamespace @namespace)
 {
     if (@namespace != null)
     {
         PdfDictionary namespaceObj = @namespace.GetPdfObject();
         if (!namespaces.Contains(namespaceObj))
         {
             namespaces.Add(namespaceObj);
         }
         nameToNamespace.Put(@namespace.GetNamespaceName(), @namespace);
     }
 }
Пример #2
0
 // it is StructTreeRoot
 // should never happen as we always should have only one root tag and we don't remove it
 private String ComposeExceptionBasedOnNamespacePresence(String role, PdfNamespace @namespace, String withoutNsEx
                                                         , String withNsEx)
 {
     if (@namespace == null)
     {
         return(String.Format(withoutNsEx, role));
     }
     else
     {
         String nsName             = @namespace.GetNamespaceName();
         PdfIndirectReference @ref = @namespace.GetPdfObject().GetIndirectReference();
         if (@ref != null)
         {
             nsName = nsName + " (" + JavaUtil.IntegerToString(@ref.GetObjNumber()) + " " + JavaUtil.IntegerToString(@ref
                                                                                                                     .GetGenNumber()) + " obj)";
         }
         return(String.Format(withNsEx, role, nsName));
     }
 }