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>(BufferedRandomAccessFile.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(FileSystemFontProvider.java:539)
    at 
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.scanFonts(FileSystemFontProvider.java:255)
    at 
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.<init>(FileSystemFontProvider.java:234)
    at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.<clinit>(FontMapperImpl.java:128)
    at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.java:147)
    at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:411)
    at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFontBoxFont(FontMapperImpl.java:374)
    at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl.getFontBoxFont(FontMapperImpl.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
>
>
>

Reply via email to