openhtmltopdf icon indicating copy to clipboard operation
openhtmltopdf copied to clipboard

Images are missing after build as jar

Open mssaravanan opened this issue 3 years ago • 7 comments

Code: <div class="logo-container"> <img src="https://www.xxxyyy.com/images/logo.png" alt="CompanyName"/> </div>

Error: com.openhtmltopdf.exception WARNING:: IO problem for https://www.xxxyyy.com/images/logo.png

mssaravanan avatar Sep 01 '21 03:09 mssaravanan

same issue here.

joelk111 avatar Sep 03 '21 03:09 joelk111

hi @mssaravanan do you have the full stracktrace?

It may be possible that you have some kind of proxy in between which is configured correctly when running from the IDE vs running outside as a jar.

syjer avatar Sep 06 '21 13:09 syjer

Hi @mssaravanan and @joelk111,

I've commented in #103.

danfickle avatar Sep 10 '21 11:09 danfickle

I have set the image from the spring boot resource folder it is working in the jar and docker image.

@syjer I have run the JAR and the application from IDE in the same environment, URL(HTTP and HTTPS) image not loaded in the JAR application.

mssaravanan avatar Sep 23 '21 14:09 mssaravanan

@mssaravanan If you say spring boot resource folder then the url is not an external (http or https) one right? What protocol are you using? file: ?

syjer avatar Sep 23 '21 14:09 syjer

@syjer I'm saying, the image src is from the spring-boot resource folder it's working, but not in the HTTP or HTTPS image URL.

mssaravanan avatar Sep 24 '21 03:09 mssaravanan

@mssaravanan, if you are running version 1.0.10 you should get details of the actual exception. Could you post it here?

danfickle avatar Sep 26 '21 05:09 danfickle