Hello,
I believe this is a bug as no error is generated and I'm not getting the results I would expect.
I'm trying to CreateBookmarks and CreateLocalLinks, but I cannot do this without first saving and re-binding a pdf file.
This code will create bookmarks, but not the link:
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf(this.textBoxOutputFolder.Text);
editor.CreateLocalLink(new Rectangle(0, 0, 200, 200), 2, 1, Color.Green);
editor.CreateBookmarks();
editor.Save("c:\\tfs\\test.pdf");
This code will create the link, but not the bookmarks.
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf(this.textBoxOutputFolder.Text);
editor.CreateBookmarks();
editor.CreateLocalLink(new Rectangle(0, 0, 200, 200), 2, 1, Color.Green);
editor.Save("c:\\tfs\\test.pdf");
To get around the problem I'm first creating the bookmarks, saving then re-binding and adding the links and saving again. Can only 1 type of task be done per PDF Bind/save or is this a bug?
Thanks,
Chris