- Home
- Forum
- ASP.NET Web Forms (Classic)
- Blank PDF is generated when converting windows authenticated web page (html file)
Blank PDF is generated when converting windows authenticated web page (html file)
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
SIGN IN To post a reply.
6 Replies
HA
hatallia
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.
GM
Geetha M
Syncfusion Team
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
HA
hatallia
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.
GM
Geetha M
Syncfusion Team
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
MA
Maroof Ahmed
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
GM
Geetha M
Syncfusion Team
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
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
-
HA hatallia
- Jun 1, 2012 09:02 AM UTC
- Dec 10, 2012 04:18 AM UTC