Pdf blank in deployment server

Hi,

I have been used ut html converter:

PdfPage page = doc.Pages.Add();
string urlToConvert = ConfigurationManager.AppSettings["ip"];

using (var converter = new HtmlConverter())
{

HtmlToPdfResult result = converter.Convert(urlToConvert + "Home/SelectedDashboardPdfView?ID=" + Session["nDashboardId"].ToString(), ImageType.Metafile,
(int) page.GetClientSize().Width, -1, AspectRatio.KeepWidth);
result.Render(page, new PdfLayoutFormat());
}

However, when i'm deployed the publish codes in our production server the pdf become blank.nothing see in the pdf files.
Please help.we need it ASAP.


3 Replies

GM Geetha M Syncfusion Team March 20, 2012 05:22 AM UTC

Hi Norazirah,

Thank you for the details.

Could you please send us the following details about server machine so that we can check and get back to you?

1. OS details
2. Bit type (32 or 64 bit)
3. IE version

Please let me know if you have any questions.

Regards,
Geetha



HA hatallia June 5, 2012 08:39 AM UTC

I have exactly the same problem - with the following server configuration: Windows 2008 Server 64bit, IE8. 
I suspect it is a security issue.

Our page is web-authenticated, it is accessible for user who generates PDF. However, without explicit username/password HtmlConverter method generates just blank PDF. I created a new discussion here, but did not get any response.


GM Geetha M Syncfusion Team June 5, 2012 09:47 AM UTC

Hi,

Thank you for the details.

As explained in the discussion link, HtmlConverter creates a new instance of webbrowser control when the conversion is initiated and hence it is not possible to make use of default credentials. 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.

http://forums.asp.net/p/1092704/1647592.aspx#1647592

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

Regards

Geetha


Loader.
Up arrow icon