I'm trying to get the bookmarks information of a specific pdf page with "iTextSharp.text.pdf", i found how to get a collection of the bookmarks in a pdf, but i want to get only for a specific page in a pdf, this is my code for the entayer pdf:
public void ExportBookmarksToXml(string SourcePdfPath, string xmlOutputPath, string Password = "")
<pre lang="c#"> {
PdfReader reader = new PdfReader(SourcePdfPath, new System.Text.ASCIIEncoding().GetBytes(Password));
IList<Dictionary<string, object>> bookmarks = SimpleBookmark.GetBookmark(reader);
using (MemoryStream memoryStream = new MemoryStream())
{
SimpleBookmark.ExportToXML(bookmarks, memoryStream, "ISO8859-1", true);
//MessageBox.Show(bookmarks[0].Values.ToString());
File.WriteAllBytes(xmlOutputPath, memoryStream.ToArray());
}
}</pre>I need this, because I want to know for every bookmark how many pages and how many blank pages it has.
Thanks!