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
retrieve bookmark and page number
Re: retrieve bookmark and page number
Support · Nov 15, 2010Hello 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.