CMDBuild Forum

Unable to print PDF or CSV

Hi all,

I performed a fresh install of CMDBUILD 3.3.2 and when I try to “print to pdf” or “print to csv” a card or the list of a view, i receive the error:

{“success”:false,“messages”:[{“level”:“ERROR”,“show_user”:false,“message”:“com.google.common.util.concurrent.UncheckedExecutionException: org.cmdbuild.report.ReportException: error loading jasper report context, caused by: org.cmdbuild.report.ReportException: error loading jasper report context, caused by: org.cmdbuild.report.ReportException: error setting font family property key =< normal > value =< org/cmdbuild/report/fonts/arial.ttf >, caused by: java.lang.reflect.InvocationTargetException, caused by: net.sf.jasperreports.engine.fonts.InvalidFontException: Error loading font “org/cmdbuild/report/fonts/arial.ttf”., caused by: java.io.IOException: Problem reading font data.”,"_message_translation":“com.google.common.util.concurrent.UncheckedExecutionException: org.cmdbuild.report.ReportException: error loading jasper report context, caused by: org.cmdbuild.report.ReportException: error loading jasper report context, caused by: org.cmdbuild.report.ReportException: error setting font family property key =< normal > value =< org/cmdbuild/report/fonts/arial.ttf >, caused by: java.lang.reflect.InvocationTargetException, caused by: net.sf.jasperreports.engine.fonts.InvalidFontException: Error loading font “org/cmdbuild/report/fonts/arial.ttf”., caused by: java.io.IOException: Problem reading font data.”}]}

actually i have the file in the path : ./webapps/cmdbuild/org/cmdbuild/report/fonts/arial.ttf

the file is world readable :

root@azictcmdb:/opt/cmdbuild/cmdbuild_30# ls -lart ./webapps/cmdbuild/org/cmdbuild/report/fonts/arial.ttf
-rw-r–r-- 1 root root 275572 Nov 10 23:36 ./webapps/cmdbuild/org/cmdbuild/report/fonts/arial.ttf

I tried to configure the JSON fonts in ./webapps/cmdbuild/WEB-INF/classes/org/cmdbuild/config

root@azictcmdb:/opt/cmdbuild/cmdbuild_30/webapps/cmdbuild/WEB-INF/classes/org/cmdbuild/config# cat default_config.properties
org.cmdbuild.report.fonts=[{“name”:“SansSerif”,“normal”:“org/cmdbuild/report/fonts/arial.ttf”,“bold”:“org/cmdbuild/report/fonts/arial.ttf”,“italic”:“org/cmdbuild/report/fonts/arial.ttf”,“boldItalic”:“org/cmdbuild/report/fonts/arial.ttf”,“pdfEmbedded”:“false”},{“name”:“Arial”,“normal”:“org/cmdbuild/report/fonts/arial.ttf”,“bold”:“org/cmdbuild/report/fonts/arial.ttf”,“italic”:“org/cmdbuild/report/fonts/arial.ttf”,“boldItalic”:“org/cmdbuild/report/fonts/arial.ttf”,“pdfEmbedded”:“false”}]

but i got the same error after tomcat restart.

Any ideas ?

many thanks in advance, best regards.