Dear Sir/Madam:
It seems when I put some asia characters into bookmark function, bookmark stops to generate after random number of bookmarks produced.
var bookmark = new Bookmark(string.Format("{0}中文", index++), 0, 0, parentOutline);
the code snippet as below:
// Add a top level Outline
Outline parentOutline = document.Outlines.Add("目录");
foreach (var chapter in chapters) {
Console.WriteLine(chapter);
var content=File.ReadAllText(chapter, Encoding.UTF8);
var bookmark = new Bookmark(string.Format("{0}中文", index++), 0, 0, parentOutline);
FormattedTextArea textarea=new FormattedTextArea(content, 0,0, pageDim.Width*0.88f, pageDim.Height*0.9f, style);
do {
Page page = new Page(pageDim);
if (bookmark != null) {
page.Elements.Add(bookmark);
bookmark = null;
}
page.Elements.Add(new BackgroundImage(imageData));
page.Elements.Add(textarea);
document.Pages.Add(page);
textarea = textarea.GetOverflowFormattedTextArea();
} while (textarea != null);
}
However, if I change it into
var bookmark = new Bookmark(string.Format("{0}Eng", index++), 0, 0, parentOutline);
It has no issue to generate all the bookmarks.
Could you please have a look?
by the way, all the content are no problem, just bookmarks.
Cheers.