Created
July 20, 2020 19:34
-
-
Save mcculley/a798f5862c9badb7b7ce8802ed5f0eba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Eagerly execute some initialization such as loading of standard fonts. | |
*/ | |
public static void initializePDFRenderer() { | |
final PDDocument document = new PDDocument(); | |
new PdfBoxFontResolver(null, document, null, PdfRendererBuilder.PdfAConformance.NONE, false); | |
try { | |
document.close(); | |
} catch (final IOException e) { | |
throw new RuntimeException(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment