|
Rank: Newbie Groups: Member
Joined: 12/20/2011 Posts: 8
|
Hi,
I'm just evaluating HTML to PDF components. Currently this one is my favorite. But unfortunately I run into an issue. I need to create a PDF from a HTML string but images within the html are located on an IIS website that uses windows authentication. It seems that UserName and Password specified the options has no effect. Every image will be rendered as a question mark. When I instead use the url to the html page everything works as expected. However I need to provide the HTML as a String. Any suggestions?
Bye, Christian
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
That does not appear to be a Window authentication issue. That most likely is because you did not set HtmlToPdf.Options.BaseUrl. As a general rule, whenever you use ConvertHtml to convert HTML that references other resources (images, styles, scripts, etc), you must set HtmlToPdf.Options.BaseUrl. Otherwise the converter would not know how to convert relative paths (for example, "hello.gif" in <img src="hello.gif" />) into a full paths.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/20/2011 Posts: 8
|
Hi,
thanks, but unfortunately this seems not to be the issue. I use absolute urls to the images.
Bye, Christian
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I can't think of anything else. As to Windows Authentication, as far as I know, it's actually NOT supported by the converter at all. So I am a bit puzzled that it actually does work when you call ConvertUrl. What if you try to call ConvertUrl directly on the image Url?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/20/2011 Posts: 8
|
Hi, when I run your "Convert Url" demo the image returns a 401 (unauthenticated). When I use your "Web Authentication" demo and enter the credentials it works as expected. When I reference images that do not require authentication in my html string (absolute urls) it works when I use images that need authentication (absoulte url) they will be rendered as a blue question mark.
Bye, Christian
|
|
Rank: Newbie Groups: Member
Joined: 12/20/2011 Posts: 8
|
Hi, I just tried this scenario with ExpertPdf HtmlToPdf and the image resolution worked as expected. Is there any chance to fix this in your API? Bye, Christian
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Certainly. What you described looks like a bug since you have already clearly specified UserName/Password through HtmlToPdfOptions. That is meant to be supported. We will investigate and get back to you as soon as possible.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have posted a new build that should fix this problem. This build uses the same way to pass user name/password for both ConvertHtml and ConvertUrl. So whatever was working for ConvertUrl should now work for ConvertHtml as well.
Please see your private message for the download location and let us know if you still see any problems.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/20/2011 Posts: 8
|
The build fixed my issue! The speed of your support is impressive! Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
You are very welcome. Thank you very much for confirming the fix!
|
|
Rank: Newbie Groups: Member
Joined: 12/21/2011 Posts: 3
|
Hi,
I have a similar problem
Scenario:
asp.net 2 app impersonation=true mode=windows windows 2003 server
local images and remote images (from a sharepoint portal) show the blue question mark I'm evaluating the last trial version from your site
How I fix ti?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Eduardo,
We have sent the new build to you. Please see your private message for the download location.
Note that authentication only works if you explicitly specify HtmlToPdf.Options.UserName and HtmlToPdf.Options.Password. IIS and IE support "Integrated Windows Authentication". With that option IE would use your current windows user account to "login" the remote server thus would not ask you for user name/password. That option DOES NOT work with the HTML to PDF converter. The HTML to PDF converter only uses explicitly specified user name/password to authenticate.
Hope this helps. Please feel free to let us know if you have any more questions.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/21/2011 Posts: 3
|
Hi ,
Thanks but doesn't works. Problem still persists
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Eduardo,
We do not know what else we can tell you on this topic when you just say "it does not work". You have to be very specific about your exact scenario, whether it's different than the original scenario posted by Christian, what's the differences are, or you believe it's the same problem but it works for him but not you, etc. The basic logic here is if your scenario is exactly the same, then it should work. If your scenario is not the same, then you have to tell us what's different.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 12/21/2011 Posts: 3
|
Hi,
Many thanks!!!!
I made a mistake (forgot put the windows credentials to access remote resource)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Glad to hear that it works. Please feel free to let us know if there is anything else.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/17/2012 Posts: 2
|
Hi, I am also stuck up with SharePoint Images Issue, can you sent the new build to me.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Imran Shaikh wrote:Hi, I am also stuck up with SharePoint Images Issue, can you sent the new build to me. The new build is already available on our download page. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 1/17/2012 Posts: 2
|
Hi, Thanks a lot for the fix, I am able to see images with new fix. But I am still facing a strange problem, with same Code.
PDF are generating with Images if we access from Site Collection Images Library. But it is failing once we are accessing Images from Publishing Images Library. SharePoint we are using is based on Claim based Authentication.
Do someone else also faced such issue.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Imran,
We are not SharePoint expert so we do not know what to tell you about Site Collection Image Library or Publishing Image Library. We can only tell you from our converter point of view:
1. It DOES support http authentication through HtmlToPdf.Options.UserName and HtmlToPdf.Options.Password; 2. It DOES NOT support IIS "Integrated Windows Authentication";
You will have to reach these two rules from your application.
Thanks!
|
|