Is it possible to use a custom REST client to fetch external resources during conversion?

We have a use-case where we need to convert HTML to PDF archives.

The HTML we use contains links to secured endpoints for certain images and embedded content which requires a configured REST client (RestTemplate, WebClient, etc) that uses the SecurityContext to set specific request headers and client authentication.

With other PDF converters, I had the ability to provide a custom UserAgent to inflate external resources but I can’t seem to find a way to accomplish this with GroupDocs conversion.

For example, IText provides support for this:

ITextRenderer renderer = new ITextRenderer();
SecureUserAgent agent = new SecureUserAgent(client, output);
agent.setSharedContext(renderer.getSharedContext());
renderer.getSharedContext().setUserAgentCallback(agent);

@jofish89

We are investigating this scenario. Your investigation ticket ID is CONVERSIONJAVA-1677.

1 Like