I have found a method to load a font from a file using a font factory. But how should I go about loading a file directly from embedded source of dll, without creating a physical file in iText 7.
Asked
Active
Viewed 619 times
1 Answers
2
PdfFontFactory has following method:
createFont(byte[] fontProgram, boolean embedded)
Creates a PdfFont instance by the bytes of the underlying font program.
So your question is basically "How do I get the byte[] from a resource in a dll", which has nothing to do with iText anymore, and which is a question that was already answered on Stack Overflow: How to Read an embedded resource as array of bytes without writing it to disk?

Bruno Lowagie
- 75,994
- 9
- 109
- 165

Joris Schellekens
- 8,483
- 2
- 23
- 54
-
And which has been answered, among other places, over here: https://stackoverflow.com/questions/10412401/how-to-read-an-embedded-resource-as-array-of-bytes-without-writing-it-to-disk – Amedee Van Gasse Aug 07 '17 at 07:22