krls23 Posted October 6, 2011 Share Posted October 6, 2011 I have a problem with the PDF/A support of JasperReports 4.2.1.I have folowed the example in the repository but, when I try to create the PDF/A, a blank file Is generated with no text inside. I have done the tests with both my report and the FirstJasper.jrxml in /demo/samples/jasper/reports, and the results is the same.I think the problem is caused by the embedded font, because the generated PDF/A file, doesn't have any attached font file.Could you help me in how to embed fonts in PDF? Code: Post Edited by krls23 at 10/17/2011 09:35Post Edited by krls23 at 10/21/2011 11:58 Link to comment Share on other sites More sharing options...
krls23 Posted October 17, 2011 Author Share Posted October 17, 2011 Could you help me, please????? Link to comment Share on other sites More sharing options...
iamwoodyjones Posted October 17, 2011 Share Posted October 17, 2011 Are you sure that it's not just an empty report because it doesn't have any data? If Jasper can't find a font, it's smart about falling back on other system installed fonts.Some things you can try to see if it's a missing font or no data problem: 1) Try a different export format other than pdf. Is the report still coming up blank? If so, try #22) Add a no-data section to your report and put some text on it. Did the report come up with the no-data section showing? Link to comment Share on other sites More sharing options...
krls23 Posted October 19, 2011 Author Share Posted October 19, 2011 Thanks for your replay.I’m sure that report is not empty, because the same report generated with iReport 4.1.2 it’s good when export to PDF/A format.The report is very simple, I have static-text with “Hello world!”. The different between the PDF generated with iReport and the PDF generated with my code is the embedded font. IReport embedded font correctly and my code don’t embedded font.I attached my report. Could you help me, this is very important for me.Post Edited by krls23 at 10/19/2011 07:50 Link to comment Share on other sites More sharing options...
iamwoodyjones Posted October 19, 2011 Share Posted October 19, 2011 fitxerPlantilla = new File(plantilla);What is plantilla? Is that a JRprint file? I would really try to export it to a different format and see if you're still having problems. If you are, and still think it's font related, I would read the jasper embedded font howto http://jasperreports.sourceforge.net/sample.reference/fonts/index.htmlFirst, though, I would look at the QueryApp sample that comes with Jasper and write a few lines of standalone code to see if the problem is within the jasper engine that doesn't have embedded fonts. Link to comment Share on other sites More sharing options...
krls23 Posted October 20, 2011 Author Share Posted October 20, 2011 "Plantilla" is the jasper file who I want export to PDF/A. Post Edited by krls23 at 10/20/2011 09:03 Link to comment Share on other sites More sharing options...
jfabre Posted October 21, 2011 Share Posted October 21, 2011 The report result is a blank page because you aren't using any datasource.If you change the line: print = filler.fill(new HashMap())by this one: print = filler.fill(new HashMap(), new JREmptyDataSource());It'll work.Joan Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now