Ejemplo n.º 1
0
        protected override void DoCloseLayoutArtefacts(PDFLayoutContext context, PDFArtefactRegistrationSet artefacts, Styles.Style fullstyle)
        {
            base.DoCloseLayoutArtefacts(context, artefacts, fullstyle);

            //Close the inner chid annotation entries
            object entries;

            if (artefacts.TryGetArtefact(LinkAnnotationChildEntries, out entries))
            {
                object[] all = (object[])entries;
                //TODO: Check the use of a link that flows over more than one page
                Layout.PDFLayoutPage pg = context.DocumentLayout.CurrentPage;

                for (int i = all.Length - 1; i >= 0; i--)
                {
                    pg.CloseArtefactEntry(PDFArtefactTypes.Annotations, all[i]);
                }
            }

            //Close the actual link
            object link;

            if (artefacts.TryGetArtefact(LinkArtefactName, out link))
            {
                context.DocumentLayout.CloseArtefactEntry(PDFArtefactTypes.Names, link);
            }
        }
Ejemplo n.º 2
0
        public void CloseLayoutArtefacts(PDFLayoutContext context, PDFArtefactRegistrationSet artefacts, Style fullstyle)
        {
            object outline, name;

            if (artefacts.TryGetArtefact(PDFArtefactTypes.Outlines, out outline))
            {
                context.DocumentLayout.CloseArtefactEntry(PDFArtefactTypes.Outlines, outline);
            }

            if (artefacts.TryGetArtefact(PDFArtefactTypes.Names, out name))
            {
                context.DocumentLayout.CloseArtefactEntry(PDFArtefactTypes.Names, name);
            }

            this.DoCloseLayoutArtefacts(context, artefacts, fullstyle);
        }