The new method has been finished. You can set color of level bookmarks via Document.BookmarkLayout event. Please use this temporary version only contains .Net 4.0 and bellow code to try:
- Code: Select all
ToPdfParameterList toPdf = new ToPdfParameterList();
toPdf.CreateWordBookmarks = true;
toPdf.WordBookmarksTitle = "Changed bookmark";
toPdf.WordBookmarksColor = Color.Gray;
document.BookmarkLayout += document_BookmarkLayout;
document.SaveToFile("5446 l.pdf", toPdf);
document.Close();
}
void document_BookmarkLayout(object sender, Spire.Doc.Documents.Rendering.BookmarkLevelEventArgs args)
{
if (args.BookmarkLevel.Level == 2)
{
args.BookmarkLevel.Color = Color.Red;
args.BookmarkLevel.Style = BookmarkTextStyle.Bold;
}
else if (args.BookmarkLevel.Level == 3)
{
args.BookmarkLevel.Color = Color.Gray;
args.BookmarkLevel.Style = BookmarkTextStyle.Italic;
}
else
{
args.BookmarkLevel.Color = Color.Green;
args.BookmarkLevel.Style = BookmarkTextStyle.Regular;
}
}
We will let you know as soon as the new version is published.
If there is any question, welcome to get it back to us.
Sincerely,
Betsy
E-iceblue support team