Welcome Guest Search | Active Topics | Sign In | Register

Issue with HtmlToPdf.ConvertHtml and images Options
Christian Glessner
Posted: Saturday, May 12, 2012 6:04:59 AM
Rank: Newbie
Groups: Member

Joined: 12/20/2011
Posts: 8
Hello,

I've an issue with HtmlToPdf.ConvertHtml and images. My PDF component runs within a Windows Service. I use UserName and Password to authenticate the web requests in order to download the images for the PDF. When I generate the PDF for the first time everything works like expected. But within following PDF generations some images are randomly missing (blue question mark). When I spin up my own app domain for each generation everything work like expected too. Seems that it only works with fresh instances of HtmlToPdf. Unfortuantely HtmlToPdf use static methods, so I've to use the app domain workaround to get a new instance. Any idea?
I use the latest build.

Thanks and regards,

Christian
eo_support
Posted: Saturday, May 12, 2012 9:30:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

UserName and Password are automatically cleared after each ConvertHtml call. So please check whether you have set them again before every call.

Thanks!
Christian Glessner
Posted: Saturday, May 12, 2012 9:32:06 AM
Rank: Newbie
Groups: Member

Joined: 12/20/2011
Posts: 8
Thanks, the creadentials get set before each call. Also some pictures get rendered others don't. All of them need authentication.
eo_support
Posted: Saturday, May 12, 2012 9:35:41 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We can't think of anything else then. You might want to use an traffic monitor to trace the HTTP tracfic to see if the user name/password are correctly sent to your server. The supposes to be sent to the server through the HTTP authentication header entry.

If you can produce a small app/environment to reproduce the problem, we will happy to take a look as well. As soon as we can see the problem, we should be able to tell you why.

Another thing you can try is to use the ConvertHtml that takes a non static HtmlToPdfOptions object as its parameter. That way you won't have to use the static members.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.