When loading css files from an external https resource that is using a self-signed ssl certificate the process hangs for roughly two minutes for each css file referenced in the html doc.
Using LoadOptions ResourceLoadingStrategy we can get around the certificate error, however; we still have to wait for each file to timeout.
Is there a way to reduce the timeout on the loading of the css file or any other suggestions you can provide?
Sample code is below. The main issue is when the stylesheet link is on a server using a self signed ssl certificate. The css is not applied during the conversion and it will take roughly 2 minutes to complete. Looks like the request to access the style sheet is not handling the certificate exception.
Would you please share a working link of external CSS so that we can test the scenario with it and try to observe the delay. With recently shared code snippet, the API took 12 seconds in our environment to generate PDF file as the CSS file link was invalid at our side.
I don’t have an external facing site that I can share for testing. The easiest thing is to use nginx or apache to host a css file and generate a self-signed certificate using openssl to use with which ever host you are most comfortable with setting up.
We regret to share that there is no way to set timeout or reduce it in the API at the moment. However, we have logged an investigation ticket as PDFJAVA-39799 in our issue tracking system to further analyse your requirements. We will look into scenario detail and will keep you informed about resolution status of the ticket. We will let you know in case we require any further information from your side. Please be patient and give us some time.