我无法复制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。
避免问题的最佳方法是提供SSCCE(另请参阅:http://sscce.org/)。可能是MigraDoc错误,可能是一个使用问题。您可以提供显示错误的MigraDoc DDL文件,而不是SSCCE:http://pdfsharp.net/wiki/MigraDocDDL.ashx –
“这是已知的Migradoc错误吗?”这是一个MigraDoc错误还是它是一个使用问题?除了截至目前为止发布的代码片段之外,获得一些反馈意见还不错。 –
颜色“0x222222”是透明的,所以“0xff222222”是不透明颜色的正确值。 MigraDoc将“0xff222222”转换为CMYK(0,0,0,86.7),所以代码似乎没有问题。但Adobe Reader似乎计算有点不同,CMYK(0,0,0,86.7)与“0xff222222”略有不同。所以“0x222222”应该是一个完全透明的颜色 - 但对于文本和下划线以及第1页和第2页应该看起来一样。但是“0xff222222”是正确的值,并且该值一切正常。 MDDDL文件允许您删除机密数据,并且可以复制该错误。 –