Beispiel #1
0
        public PdfPage MakePage(PdfResources resources, PdfContentStream contents,
                                int pagewidth, int pageheight, string[] currentPageIdList)
        {
            PdfPage page = new PdfPage(
                resources, contents,
                pagewidth, pageheight,
                doc.NextObjectId());

            if (currentPageIdList != null)
            {
                foreach (string id in currentPageIdList)
                {
                    idReferences.setInternalGoToPageReference(id, page.GetReference());
                }
            }

            /* add it to the list of objects */
            this.objects.Add(page);

            page.SetParent(doc.Pages);
            doc.Pages.Kids.Add(page.GetReference());

            return(page);
        }
Beispiel #2
0
        public PdfPage makePage(PdfResources resources, PdfContentStream contents,
                                int pagewidth, int pageheight, Page currentPage)
        {
            PdfPage page = new PdfPage(
                resources, contents,
                pagewidth, pageheight,
                doc.NextObjectId());

            if (currentPage != null)
            {
                foreach (string id in currentPage.getIDList())
                {
                    idReferences.setInternalGoToPageReference(id, page.GetReference());
                }
            }

            /* add it to the list of objects */
            this.objects.Add(page);

            page.SetParent(doc.Pages);
            doc.Pages.Kids.Add(page.GetReference());

            return page;
        }