Hi,
I like to generate multiple PDF documents with images and text. I am
using a TTF font and my goal is to load the font once in the constructor
of my class and then to create multiple documents with this font.
I try to load the font with "PDType0Font.load(new PDDocument(), File)"
and then call my method three times to create three identical documents.
The first document is created successful, but the next throwing
"java.io.IOException: The TrueType font does not contain a 'cmap' table".
If I load the font with "PDTrueTypeFont.loadTTF(new PDDocument(),
File)", I can create three documents, but only with text.
Adding an image "PDImageXObject img =
LosslessFactory.createFromImage(doc, bufferedImage)" ends up with
throwing "java.io.IOException: Scratch file already closed".
Is it possible to load the font only once at all ?
I am using PDFBox 2.0.0-RC3 and here is a code snippet
http://pastebin.com/wrvUrZJR
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]