简体   繁体   中英

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.

Can any one please help me to fix this issue.

您可以创建段落的对象并将段落添加到文档中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM