bookmark

bookmark

Forum member · Feb 5, 2010
How do you add Bookmark for each PDf file when merging Code example MergeDocument document = new MergeDocument(MapPath("~/PDFs/file1.pdf); document.Append(MapPath("~/PDFs/file2.pdf")); document.Draw(MapPath("~/PDFs/MergePDFs.pdf"));

Re: bookmark

Support · Feb 5, 2010
Hello, You can access the pages after merging from the page collection by using the page index. Then you can add any page element including Bookmark to the page. mergeDocument.Pages[0].Elements.Add( new Bookmark( "Bookmark to page 1", 0, 0, parentOutline ) ); Thanks, ceTe Software Support Team.

Re: bookmark

Forum member · Feb 5, 2010
Thank you for you help I was able to add the bookmarks but I need to find out what page each PDF document starts on. Any Ideas?

Re: bookmark

Support · Feb 5, 2010
Hello, Are you trying to find out the page when you are merging a new document to the MergeDocument object? If so, you can get the number of pages by using the page collection and then the next one will be the starting page of the PDF to be appended. MergeDocument document = new MergeDocument(); document.Append( filePath1 ); int count = document.Pages.Count; //next page number will be count+1, if you merge another PDF. document.Append( filePath2 ); //count is used as page index document.Pages[count].Elements.Add( bookmarkObject ); If this does not help you then please be more specific about the requirement you have so that we can help you further. Thanks, ceTe Software Support Team.

Re: bookmark

Forum member · Feb 5, 2010
allset Thanks