/// <summary>Processes an object.</summary>
        /// <remarks>
        /// Processes an object. If the object is indirect, it is added to the
        /// list of resources. If not, it is just processed.
        /// </remarks>
        /// <param name="obj">the object to process</param>
        protected internal void Process(PdfObject obj)
        {
            PdfIndirectReference @ref = obj.GetIndirectReference();

            if (@ref == null)
            {
                LoopOver(obj);
            }
            else
            {
                if (!resources.ContainsKey(@ref.GetObjNumber()))
                {
                    resources[@ref.GetObjNumber()] = obj;
                    LoopOver(obj);
                }
            }
        }
Example #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));
     }
 }