I am using the FPDF library in python to create a report, it contains the Arial font, and it needs a .ttf to work correctly when generating the report.
pdf = PDF(orientation = 'L', unit = 'mm', format = 'A4')
pdf.add_font('Arial', '', "/var/www/johannasenvironment/JohannasEnviroment/JohannasEnviroment/treasuryEmails/mails/arial.ttf", uni=True)
At the moment of executing the program, it does not find the arial.ttf file that is in the given path, I already tried with relative path and absolute path, and it still does not find the file. In windows it works correctly, I don't know what happens when you pass it to linux.
I am doing something wrong? Should it be implemented differently when I work on linux? if so, how can i do it?
I appreciate your collaboration
When doing the command:
ls -lh
total 524K
-rwxrwxrwx 1 root root 596 feb 25 08:36 arial.cw127.pkl
-rwxrwxrwx 1 root root 130K feb 25 08:36 arial.pkl
-rwxrwxrwx 1 root root 359K feb 25 08:36 arial.ttf
-rwxrwxrwx 1 root root 11K feb 25 16:12 formatPays.py
-rwxrwxrwx 1 root root 617 feb 25 08:36 format.sql
-rwxrwxrwx 1 root root 2,3K feb 25 08:36 mailsFunctions.py
drwxrwxrwx 2 administrador administrador 4,0K feb 25 16:13 __pycache__
-rwxrwxrwx 1 root root 607 feb 25 08:36 validations.py
I add error image with its traceback enter image description here