Rank: Newbie Groups: Member
Joined: 1/17/2012 Posts: 1
|
We are attempting to convert some pages that are hosted in iis/sharepoint to PDF files using either the ASPXToPDF1.RenderAsPDF(); or HtmlToPdf.ConvertHtml(). In either case, the files convert fine WITH the exception of images. Is this an issue that someone else has experienced in the past? Is there something we should look for from a troubleshooting perspective?
Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can use HtmlToPdf.ConvertHtml directly because that's what RenderAsPDF actually calls. Make sure you set HtmlToPdf.Options.BaseUrl correctly because you call ConvertHtml. That property is important for images. RenderAsPDF will try to automatically set it but it may get it wrong in certain scenarios.
Also make sure you do NOT enable Window integrated authentications on image files. The converter currently does not automatically pass your current windows user identity to the Web server, so if you have windows integrated authentication enabled, then the converter will get (401 authentication required) error on the images thus fail to render the image.
Hope this helps. Please feel free to let us know if you still have any questions.
Thanks!
|