Interface HtmlToPdfAConverter
- All Known Implementing Classes:
OpenHtmlToPdfAConverter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface of an HTML-to-PDF/A converter.
- Author:
- Quentin Ligier
-
Method Summary
-
Method Details
-
convert
Converts the HTML content to its PDF/A representation, with a custom template.- Parameters:
lang- The document language, as an ISO code.contextVariables- The context variables to be added to the template processing. Note that a context variablelangis automatically added with the code value of the receivedlangparameter. Furthermore, the following context variables – and, possibly, others – are expected by the default templates provided with this module, since they are needed to produce a valid PDF/A document:title- a string with the document's title.subject- a string with the document's subjectauthor- a string with the document's authordescription- a string with the document's descriptionbookmarks- a map of<String, String>pairs:- Key: a string with the bookmark link reference, that is, the value of the href attribute of an anchor element within the processed template.
- Value: the value of the bookmark, that is, the string that will be used to display the bookmark itself.
("Active Treatments", "#active-treatments")should be used to produce a bookmark to be rendered asActive Treatmentsthat would point to the HTML element with idactive-treatmentsin the processed template.
templateContent- The custom Thymeleaf content.- Returns:
- The content of the generated PDF/A.
-