Free Support Forum - aspose.com

Image issue when coverting html file to jpg image

Hello Team,

I am trying to convert html file to jpg image file using Aspose.HTML version 21.4. In that jpg image is getting generated but nothing displaying into it. Can you please suggest why blank image is generated?

I have added sample application to reproduce issue. In application, input.html file is located into ImageOutput folder. Images used into input.html file are located in Images folder.

When you run sample application it will generate output_1.jpg file into ImageOutput folder.

HTMLtoImage_Core.zip (884.5 KB)

@siriussynoptek

We could not notice the issue in our environment during testing the scenario, We placed your HTML and other files in a location and set the image/CSS paths in the HTML relatively. After running the code snippet, the output was fine:

output_out_1.jpg (285.2 KB)

Please make sure that all resources in the HTML file are present at correct location and path is correct in the HTML when you are converting it into JPG. In case issue still persists, please let us know.