我无法复制 MigraDoc 的问题。
这是我添加到 MigraDoc Hello World 示例中的代码:
paragraph2 = section.AddParagraph();
var textFormat0 = BuildTextFormat(false, false, false);
var textFormat1 = BuildTextFormat(false, false, true);
var textFormat2 = BuildTextFormat(false, true, false);
var textFormat3 = BuildTextFormat(false, true, true);
var textFormat4 = BuildTextFormat(true, false, false);
var textFormat5 = BuildTextFormat(true, false, true);
var textFormat6 = BuildTextFormat(true, true, false);
var textFormat7 = BuildTextFormat(true, true, true);
var formattedText = paragraph2.AddFormattedText(textFormat0);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat1);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat2);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat3);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat4);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat5);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat6);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat7);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat0);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat1);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat2);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat3);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat4);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat5);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat6);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat7);
formattedText.Add(new Text("Hello, World! "));
paragraph2 = section.AddParagraph();
formattedText = paragraph2.AddFormattedText(textFormat0);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat1);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat2);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat3);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat4);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat5);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat6);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat7);
formattedText.Add(new Text("Hello, World! "));
section.AddPageBreak();
paragraph2 = section.AddParagraph();
formattedText = paragraph2.AddFormattedText(textFormat0);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat1);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat2);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat3);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat4);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat5);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat6);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat7);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat0);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat1);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat2);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat3);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat4);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat5);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat6);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat7);
formattedText.Add(new Text("Hello, World! "));
paragraph2 = section.AddParagraph();
formattedText = paragraph2.AddFormattedText(textFormat0);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat1);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat2);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat3);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat4);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat5);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat6);
formattedText.Add(new Text("Hello, World! "));
formattedText = paragraph2.AddFormattedText(textFormat7);
formattedText.Add(new Text("Hello, World! "));
这会生成一个包含两页的 PDF 文件,并在两页上正确显示带下划线的文本。
不是一般问题 - 我应该等待 SSCCE。