|
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
|
|
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!
|
|
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.
|
|
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!
|
|