2006 JR Open Discussion Posted August 22, 2006 Share Posted August 22, 2006 By: dotimin - dotimin images scaling in Excel 2006-07-12 02:10Hi, in my report I have several images and charts. I try to export a report to Excel (JExcelApi)format. Export works but all images and charts are shown with bad quality (if I export the same report to PDF I get excellent quality. Also I noticed that all images are scaled (about 133%). This is not what I need to get.. Do you know any solutions for that? Thanks! Link to comment Share on other sites More sharing options...
scott.a.miller Posted March 21, 2008 Share Posted March 21, 2008 Hey Everyone, I am seeing this same behavior in both RTF and Excel. What I've been able to discern is that the sizes are correct coming out of jasperreports, but by the time the resulting file is opened by Word or Excel, the row heights and widths have all been slightly increased. The images are correctly expanded to fill the space, but the resolution is obviously compromised. My current solution is to create my own JRImageRenderer objects with images scaled by 1.33x1.33 for RTF, and 1.33x1.18. I had to modify JExcelApiExporter to leave the image alone if it's a BufferedImage provided by a JRImageRenderer. Then both Word and Excel correctly expand the image to the pixel-perfect size. This solution is a hack, although it fortunately does appear to work in both Excel and OpenOffice. I would really like to have a more generic solution if possible. Anyone else have any more information on this issue? Thanks,Scott Link to comment Share on other sites More sharing options...
scott.a.miller Posted March 21, 2008 Share Posted March 21, 2008 Accidental double-post Post edited by: scott.a.miller, at: 2008/03/21 15:34 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