We have purchase PDF for .NET. I am facing an issue where if i use HTML with Http Image link it printed perfactly but when i try to print the same HTML with Https Link. It does not print the image. Please help.
Thanks for contacting support.
Would you please share your sample HTML file with us. We will test the scenario in our environment and address it accordingly.
Thank you for contacting back. i have simple HTML string that i am printing. If i run application on http and give image path like “http://application/theme/images/abc.png” it printed successfully in PDF. When i print same html but with https link like “https://application/theme/images/abc.png” it does not print. its not any specific scenario.
Thanks for your response.
We have tested the scenario with Aspose.PDF for .NET 18.8 by converting sample HTML into PDF. HTML file had both image URLs i.e. (with http and https) and resultant PDF contained two images in it. For your kind reference, sample code snippet and input/output files are also attached.
Aspose.Pdf.HtmlLoadOptions objLoadOptions = new Aspose.Pdf.HtmlLoadOptions(); objLoadOptions.PageInfo.Margin.Bottom = 0; objLoadOptions.PageInfo.Margin.Top = 0; objLoadOptions.PageInfo.Margin.Right = 0; objLoadOptions.PageInfo.Margin.Left = 0; objLoadOptions.PageInfo.Height = PageSize.A4.Width; objLoadOptions.PageInfo.Width = PageSize.A4.Height; Aspose.Pdf.Document doc = new Aspose.Pdf.Document(dataDir + "ImageHTML.html", objLoadOptions); doc.Save(dataDir + "SamplefromHtml.pdf");
Would you please share sample console application including source HTML, which is also able to replicate the issue in any environment. We will again test the scenario in our environment and address it accordingly.
Thank you for reply and code sample. Actually i am facing problem with deployed version in development it all working fine. but when i deploy it does not work. am i missing some iis setting ?? image is accessible from https link but does not print in PDF.
Thanks for sharing more details.
It seems your environment specific issue. I am afraid we cannot help much without replicating the issue in our environment. May be you can check your IIS settings and deployment server settings if it allows that security protocol type which allows application to download files from HTTPS URL.
Please also check by deploying a sample web application locally and see if issue persists. In case it does, please share sample application with us. We will again test it in our environment and address accordingly.