[英]iTextSharp.tool.xml.XMLWorkerHelper.GetInstance().ParseXHtml() throwing exception as the document has no pages using WebBrowser in windows application
Can any one please help me arround as i am using below code: 我在使用以下代码时,任何人都可以帮助我吗:
var ex_html = wbBrowser.DocumentText;
using (var srHtml = new StringReader(ex_html))
{
//Parse the HTML
iTextSharp.tool.xml.XMLWorkerHelper.GetInstance().ParseXHtml(writer, doc, srHtml);
}
But while getting instance i am facing a runtime exception as ' the document has no pages '. 但是在获取实例时,我遇到了运行时异常,因为“ 文档没有页面 ”。
Also i have identical itextSharp and XMLWorker but still facing this issue. 我也有相同的itextSharp和XMLWorker,但仍然面临这个问题。
Can any one please help me to fix this issue. 谁能帮我解决这个问题。
您可以创建段落的对象并将段落添加到文档中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.