Ejemplo n.º 1
0
        public void AddItem(PdfOutline outline)
        {
            if (childs.Count > 0)
            {
                outline.prev = (PdfOutline) childs[childs.Count - 1];
                outline.prev.next = outline;
            }
            else
            {
                first = outline;
            }

            childs.Add(outline);
            outline.parent = this;

            last = outline;
        }
Ejemplo n.º 2
0
        public PdfOutline MakeOutline(PdfOutline parent, string title, PdfPage page)
        {
            var target = string.Format(CultureInfo.InvariantCulture, "[{0} /XYZ null null 0]", page.Reference);

            var outline = new PdfOutline(++objectcounter, title, target);

            if (parent != null)
            {
                parent.AddItem(outline);
            }

            trailer.Add(outline);
            return outline;
        }