We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Blank PDF is generated when converting windows authenticated web page (html file)

Thread ID:

Created:

Updated:

Platform:

Replies:

103817 Jun 1,2012 09:02 AM UTC Dec 10,2012 04:18 AM UTC ASP.NET Web Forms (Classic) 6
loading
Tags: PDF
hatallia
Asked On June 1, 2012 09:02 AM UTC

Dear Support,

I am using 9.103.0.24 version of Syncfusion to render PDF from a web page. Page is HTML file located in the SharePoint document library. Windows authentication is used to access SharePoint site. There are two servers in the SharePoint farm (windows 2008, IE 8), and not always but sometimes PDF is generated as a blank page on one of the server. 

I could not find any error logs but it seems like HtmlConverter cannot get images by provided url. Below is a method I use:

htmlconverter.FromString(htmlData, baseUrl, ImageType.Metafile, (int)width, -1, AspectRatio.KeepWidth)

If I specify username and password in this method explicitly, everything works fine. However, why does it work like this? Can HtmlConverter just use the default credentials (current user has enough permissions to access the web page)? Is there any workaround not to pass username/password and get it working?

Thanks in advance,
Kind regards,
Natallia



hatallia
Replied On June 4, 2012 01:00 PM UTC

Any ideas how to get PDF generated from a web-authenticated page using Default credentials (not using username/password explicitly)? 

Looking forward to your reply.

Geetha M [Syncfusion]
Replied On June 5, 2012 09:42 AM UTC

Hi,

Thank you for your interest in Syncfusion products.

HtmlConverter does not make use of Default Credentials. It internally makes use of MSHTML.dll (IE rendering engine) and when every time a conversion is initiated, it will create a new instance of WebBrowser control which is equivalent to opening the URL in new browser window in IE.

However, you may work around this in your application as explained in the link below. You may edit the url of the webpage and append it along with credentials.


Please try this and let me know if you have any questions.

Regards
Geetha

hatallia
Replied On June 5, 2012 12:09 PM UTC

Geetha M,

Many thanks to your reply. I will use this workaround.

The strange thing is during my tests HtmlConverter mostly generated a blank PDF file and sometimes it did generate a correct one - even without appended credentials. That is why I asked this question.

Geetha M [Syncfusion]
Replied On June 6, 2012 04:31 AM UTC

Hi,

Thank you for the update.

Please let us know if you have any other questions.

Regards

Geetha

Maroof Ahmed
Replied On December 7, 2012 11:47 AM UTC

I am also facing the same problem.

Can you please let me know what version of IE is required on server.

 

Regards,

Maroof


Geetha M [Syncfusion]
Replied On December 10, 2012 04:18 AM UTC

Hi Maroof,

Thank you for your interest in Syncfusion products.

HTMLConverter works with Internet Explorer versions 6 and later. Could you please try the workaround stated above and if you still reproduce the problem, send us the code snippet?

Regards

Geetha


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;