iTextSharp.text.pdf.SimpleBookmark.GetBookmark C# (CSharp) Метод

GetBookmark() публичный статический Метод

public static GetBookmark ( PdfReader reader ) : Object>>.IList
reader PdfReader
Результат Object>>.IList
        public static IList<Dictionary<String, Object>> GetBookmark(PdfReader reader)
        {
            PdfDictionary catalog = reader.Catalog;
            PdfObject obj = PdfReader.GetPdfObjectRelease(catalog.Get(PdfName.OUTLINES));
            if (obj == null || !obj.IsDictionary())
                return null;
            PdfDictionary outlines = (PdfDictionary)obj;
            return SimpleBookmark.GetBookmark(reader, outlines, false);
        }

Same methods

SimpleBookmark::GetBookmark ( PdfReader reader, PdfDictionary outline, bool includeRoot ) : Object>>.IList

Usage Example

Пример #1
0
        /**
         * Gets a <CODE>List</CODE> with the bookmarks. It returns <CODE>null</CODE> if
         * the document doesn't have any bookmarks.
         * @param reader the document
         * @return a <CODE>List</CODE> with the bookmarks or <CODE>null</CODE> if the
         * document doesn't have any
         */
        public static IList <Dictionary <String, Object> > GetBookmark(PdfReader reader)
        {
            PdfDictionary catalog = reader.Catalog;
            PdfObject     obj     = PdfReader.GetPdfObjectRelease(catalog.Get(PdfName.OUTLINES));

            if (obj == null || !obj.IsDictionary())
            {
                return(null);
            }
            PdfDictionary outlines = (PdfDictionary)obj;

            return(SimpleBookmark.GetBookmark(reader, outlines, false));
        }