retrieve bookmark and page number

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for Java (v4.x)  /  Display Thread

DynamicPDF Merger for Java (v4.x) Forum

 Nov 15 2010 4:28 AM
Hi,

 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.

-Siva
 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();
doc.draw("F:/temporary/Hello.pdf");


Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 2:38 PM.