We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert HTML to PDF using Aspose.PDF for .NET - Images are not showing in output

We are facing the issue that PDF file cannot show the images in web portal but it works in localhost only. We retrieve the image blob file from database and return byte from server site and then show it with tag. As I said earlier, it is completely working fine in localhost but when we go to web and download the same file, there are no images after all. Please see the attached photos for your reference.PDFReport from web.png (10.0 KB)
PDFReport from local.png (76.3 KB)

@cheesing

Thank you for contacting support.

The issue you are currently facing is most likely because of different paths or file handling. Would you please make sure the images are retrieved fine without using Aspose.PDF API and then share your kind feedback with us.

@Farhan.Raza

We do not use the File Path. Image data is come from database.

We are converting HTML to PDF.

So, in the html we redirect the image source to the URL which will return FileContent.

For example,

<img src=”https://appWeb.net/getImage?imageId=1”>

The issue is that images are not displayed when we use https.

If we use unsecure URL(http) only, it is working fine. But our applications are needed to be secured.

Appreciated if you can help and advice for this.

@cheesing

Would you please verify without using Aspose.PDF but using a browser to convert the HTML to PDF and share if the images are shown when using secure URL so that it may be ascertained to be some problem related with Aspose.PDF only.

Once confirmed, please share a narrowed down sample application along with all necessary resources so that we may try to reproduce and investigate it further. Also ensure using Aspose.PDF for .NET 19.2 in your environment.

@Farhan.Raza

Thank you for your fast reply. We do have another web pages which are showing images that retrieved from db. One thing, currently our Aspose.PDF.dll version is 18.7. Do we need to pay another license fee if we upgrade it to 19.2? And also we will make a sample application and send to you later. Thanks.

@cheesing

Since the issue appears random in nature so it is less likely to be a problem with Aspose.PDF for .NET but some other reason. However, please take your time and share requested application with us as per your convenience so that we may assist you accordingly.

For information related to renewal of license or subscription, please create a post in Purchase Forum.