Hi,
i need to create PDF bookmarks programmatically and using RadDocument model api instead of RadDocumentEditor.
My code looks like this:
// Create section with header, footer and two paragraphs.
Section section =
new
Section();
// Create bookmark.
var titleSpan =
new
Span(title);
BookmarkRangeStart start =
new
BookmarkRangeStart(title);
BookmarkRangeEnd end =
new
BookmarkRangeEnd();
start.End = end;
end.Start = start;
Paragraph headingParagraph =
new
Paragraph() { StyleName =
"Heading1"
};
// Insert inlines.
headingParagraph.Inlines.Add(start);
headingParagraph.Inlines.Add(titleSpan);
headingParagraph.Inlines.Add(end);
section.Blocks.Add(headingParagraph);
this
.radDocument.Sections.Add(section );
but when I open document in AdobeReader there aren't any bookmarks.
What's wrong with this code?
Thank you.