public static void generate(HttpMethod httpMethod, String formName,
String requestSource,
MultiValueMap<String, String> parameters) {
UriComponentsBuilder uriComponentsBuilder =
UriComponentsBuilder.fromHttpUrl(htmlFormProperties.getBaseUrl());
uriComponentsBuilder.queryParam("formName", formName);
uriComponentsBuilder.queryParam("requestSource", requestSource);
String htmlForm = htmlFormClientRestTemplate.postForObject(uriComponentsBuilder.build().toUriString(), parameters, String.class);
ByteArrayOutputStream byteArrayOutputStream = new
ByteArrayOutputStream(html.getBytes(Charset.defaultCharset()).length);
HtmlConverter.convertToPdf(html, byteArrayOutputStream);
}
We have something like this to convert a html to pdf using HtmlConverter, and I'm trying to change the page orientation to landscape but no luck, is there a way to have dynamic page orientation (Portrait and Landscape) any thoughts/inputs ??