How to Import Bookmark from xml to existing pdf?
I am currently working on pdf projects (dotnet/c#[Itextsharp pdf]), I want to export and import bookmarks from one pdf to another pdf (both pdf are having same content, only difference are with bookmark/without bookmark and one is normal pdf and another linked pdf). Exporting bookmarks to xml is working fine but I don`t have the idea of importing exported bookmark(xml) to another pdf. Can any body suggest solution.
Here I am attaching my code.
string inputpdf = "D:\\chapter1.pdf"; string outputbookmark="D:\\chapter1Bookmark.xml";
PdfReader reader = new PdfReader(inputpdf);
IList> bookmarks = SimpleBookmark.GetBookmark(reader);
using (StreamWriter Sw = new StreamWriter(outputbookmark))
{
SimpleBookmark.ExportToXML(bookmarks, Sw,"ISO8859-1", true);
}
reader.Close();

Karthik ElumalaiRank #544 · 4.5K reputationPosted Jun 23, 2016, 6:55 PM EDT
Nachiappan Rajendran8 reputationPosted Jun 23, 2016, 8:55 PM EDT
Vinay SinghRank #604 · 4K reputationPosted Jun 23, 2016, 11:04 PM EDT
alice yangRank #2,329 · 607 reputationPosted Jun 26, 2016, 5:16 PM EDT