Jump to content
JasperReports Library 7.0 is now available ×

jasper.properties not read?


greylimbo

Recommended Posts

I have tried to get my eclipse project to read the "jasper.properties" file and therefore find the .ttf files but it never seems to be reading the "jasper.properties" file. I am battling to get it to set the default folder for the fonts i want use. I have been able to add the .ttf files to my classpath and then it runs perfectly, unsure as to if my "jasper.properties" file is ever read? I am running subreports and using jasperreports-x.x.x-javaflow.jar to improve the performance, but how do I check to see that "net.sf.jasperreports.subreport.runner.factory=net.sf.jasperreports.engine.fill.JRContinuationSubrepo rtRunnerFactory"

 

is even being implemented? any assistance is most welcome.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

The properties file is definately in the classpath. It is just a java application, the problem is that if i place the .ttf files into the classpath then the exporter finds them and its all happy. But if i set "net.sf.jasperreports.export.pdf.fontdir.jasper=../fonts" in the properties file and move the .ttf files into the fonts directory i get this error message:

Exception in thread "AWT-EventQueue-0" net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font :

pdfFontName : Tahoma.ttf

pdfEncoding : Cp1252

isPdfEmbedded : true

at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:1488)

at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:1391)

at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:1374)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1731)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:613)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:577)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:520)

at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:306)

 

I have looked at other posts that deal with this issue and i still cannot get it to work?

Link to comment
Share on other sites

bytes = JRLoader.loadBytesFromLocation(pdfFont.getPdfFontName(), classLoader, urlHandlerFactory);

this is where the app bombs out,

Code:
classLoader and 
Code:
[code]urlHandlerFactory
are both null, is this correct?

 

Surely if the properties files is in the classpath and is being read I dont have to hard code

Code:
[code]JRProperties.PDF_FONT_DIRS_PREFIX
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...