Пример #1
0
        /// <summary>Gets an unmodifiable collection of marked content references on page.</summary>
        /// <remarks>
        /// Gets an unmodifiable collection of marked content references on page.
        /// NOTE: Do not remove tags when iterating over returned collection, this could
        /// lead to the ConcurrentModificationException, because returned collection is backed by the internal list of the
        /// actual page tags.
        /// </remarks>
        public virtual ICollection <PdfMcr> GetPageMarkedContentReferences(PdfPage page)
        {
            IDictionary <int, PdfMcr> pageMcrs = GetParentTreeHandler().GetPageMarkedContentReferences(page);

            return(pageMcrs != null?JavaCollectionsUtil.UnmodifiableCollection(pageMcrs.Values) : null);
        }
 /// <summary>Gets an unmodifiable collection of marked content references on page.</summary>
 /// <remarks>
 /// Gets an unmodifiable collection of marked content references on page.
 /// NOTE: Do not remove tags when iterating over returned collection, this could
 /// lead to the ConcurrentModificationException, because returned collection is backed by the internal list of the
 /// actual page tags.
 /// </remarks>
 /// <param name="page">
 ///
 /// <see cref="iText.Kernel.Pdf.PdfPage"/>
 /// to obtain unmodifiable collection of marked content references
 /// </param>
 /// <returns>the unmodifiable collection of marked content references on page, if no Mcrs defined returns null
 ///     </returns>
 public virtual ICollection <PdfMcr> GetPageMarkedContentReferences(PdfPage page)
 {
     ParentTreeHandler.PageMcrsContainer pageMcrs = GetParentTreeHandler().GetPageMarkedContentReferences(page);
     return(pageMcrs != null?JavaCollectionsUtil.UnmodifiableCollection(pageMcrs.GetAllMcrsAsCollection()) :
                null);
 }