Hi Valentin,

Not sure what device you are using:
But the clue to the problem is here: java.io.FileNotFoundException:
/usr/share/fonts/truetype/fonts-japanese-gothic.ttf

If you put the file there..
https://github.com/blagarde/midori/blob/master/fonts-japanese-gothic.ttf

It may fix the problem.


On 15/10/2019, 17:09, "Valentin Wittich" <i...@vsign.de> wrote:

>ps: I forgot to attach the stack trace:
>
>15-Oct-2019 18:06:18.130 WARNING [https-jsse-nio-8443-exec-45]
>org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.loadDiskCache New
>fonts found, font cache will be re-built
>15-Oct-2019 18:06:18.130 WARNING [https-jsse-nio-8443-exec-45]
>org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.<init> Building
>on-disk font cache, this may take a while
>15-Oct-2019 18:06:18.198 SEVERE [https-jsse-nio-8443-exec-45]
>org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.addTrueTypeFont
>Could not load font file:
>/usr/share/fonts/truetype/fonts-japanese-gothic.ttf
> java.io.FileNotFoundException:
>/usr/share/fonts/truetype/fonts-japanese-gothic.ttf (No such file or
>directory)
>    at java.io.RandomAccessFile.open0(Native Method)
>    at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
>    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
>    at 
>org.apache.fontbox.ttf.BufferedRandomAccessFile.<init>(BufferedRandomAcces
>sFile.java:88)
>    at org.apache.fontbox.ttf.RAFDataStream.<init>(RAFDataStream.java:63)
>    at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:84)
>    at 
>org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.addTrueTypeFont(File
>SystemFontProvider.java:539)
>    at 
>org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.scanFonts(FileSystem
>FontProvider.java:255)
>    at 
>org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.<init>(FileSystemFon
>tProvider.java:234)
>    at 
>org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.<clinit>
>(FontMapperImpl.java:128)
>    at 
>org.apache.pdfbox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.j
>ava:147)
>    at 
>org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java
>:411)
>    at 
>org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFontBoxFont(FontMapperIm
>pl.java:374)
>    at 
>org.apache.pdfbox.pdmodel.font.FontMapperImpl.getFontBoxFont(FontMapperImp
>l.java:348)
>    at 
>org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:146)
>    at 
>org.apache.pdfbox.pdmodel.font.PDType1Font.<clinit>(PDType1Font.java:79)
>
>On 15.10.19 17:54, Valentin Wittich wrote:
>> Hi there,
>>
>> not sure if that is a bug or something with my local installation.
>> Either way I would like to understand the root of the issue.
>>
>> I'm getting a FileNotFoundException if I use PDType1Font.HELVETICA_BOLD.
>>
>> All I do is
>>
>> PDPageContentStream contentStream;
>> contentStream.beginText(); PDFont font; font =
>>PDType1Font.HELVETICA_BOLD; contentStream.setFont(font, 10.0);
>>contentStream.newLineAtOffset(60.0, 775.0);
>>contentStream.showText("Hello world!"); contentStream.endText();
>>
>> Any clue what the issue might be?
>>
>> Regards Valentin
>>
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to