java.io.IOException: /content/pdfgen2.war/WEB-INF/classes/arialuni.ttf not found as file or resource.

Stack Overflow | Michael Lemos | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Getting the right file path from a maven resource folder - iText

    Stack Overflow | 7 months ago | Michael Lemos
    java.io.IOException: /content/pdfgen2.war/WEB-INF/classes/arialuni.ttf not found as file or resource.

    Root Cause Analysis

    1. java.io.IOException

      /content/pdfgen2.war/WEB-INF/classes/arialuni.ttf not found as file or resource.

      at com.itextpdf.text.io.RandomAccessSourceFactory.createByReadingToMemory()
    2. iText, a Free Java-PDF library
      BaseFont.createFont
      1. com.itextpdf.text.io.RandomAccessSourceFactory.createByReadingToMemory(RandomAccessSourceFactory.java:248)[itextpdf-5.5.3.jar:5.5.3]
      2. com.itextpdf.text.io.RandomAccessSourceFactory.createBestSource(RandomAccessSourceFactory.java:173)[itextpdf-5.5.3.jar:5.5.3]
      3. com.itextpdf.text.pdf.RandomAccessFileOrArray.<init>(RandomAccessFileOrArray.java:148)[itextpdf-5.5.3.jar:5.5.3]
      4. com.itextpdf.text.pdf.TrueTypeFont.process(TrueTypeFont.java:641)[itextpdf-5.5.3.jar:5.5.3]
      5. com.itextpdf.text.pdf.TrueTypeFontUnicode.process(TrueTypeFontUnicode.java:121)[itextpdf-5.5.3.jar:5.5.3]
      6. com.itextpdf.text.pdf.TrueTypeFontUnicode.<init>(TrueTypeFontUnicode.java:98)[itextpdf-5.5.3.jar:5.5.3]
      7. com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:704)[itextpdf-5.5.3.jar:5.5.3]
      8. com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:622)[itextpdf-5.5.3.jar:5.5.3]
      9. com.itextpdf.text.pdf.BaseFont.createFont(BaseFont.java:457)[itextpdf-5.5.3.jar:5.5.3]
      9 frames