简体   繁体   中英

Convert aspx content to pdf

I am using iTextSharp for convert aspx content to pdf . But facing problem for https site where page is secured and can't don lad as pdf. and geting error like "Internet explorer was not able to open this internet site. The requested site

is either unavailable or cannot be found . Please try again later"

Try ABCpdf.NET. You only have to pass the url of the page.

As Sidharth suggested you could use ABCpdf library. Take a look at this SO question that I've posted a possible solution for: Convert HTML to PDF - Any library for ASP.net

Instead of making a call to AddImageHtml you need to call GetImageUrl :

int pageID = doc.AddImageUrl(html, true, 1024, true);

The rest of the example should be the same.

Hope this will help you.

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