retrieve bookmark and page number

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for Java (v4)  /  Re: retrieve bookmark and page number

DynamicPDF Merger for Java (v4) Forum

 Nov 15 2010 4:28 AM

 I checked the API and examples. I am not able to find code for getting bookmarks and their respective page numbers.

 I was able to retrieve bookmark as outline. From there I was not able to get the page number it is present in. Could you please provide me the code sample which does the same.

 Nov 15 2010 10:30 AM
Posted by a ceTe Software moderator
Hello Siva,

Here is the code that you can use to get the outlines page number in v5. This is not supported in v4.

PdfDocument pdf = new PdfDocument("F:/temporary/AllPageElements.pdf");
MergeDocument doc=new MergeDocument(pdf);
int pagenumer = pdf.getOutlines().getPdfOutline(0).getTargetPageNumber();
String name = pdf.getOutlines().getPdfOutline(0).getText();

ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 5:25 PM.