ratipornl321 Posted October 4 Posted October 4 Hi guys! Currently i'm using Jasperreport Ver. 6.21.3 and wanna upgrade to 7.0.1. But i got this error which is cannot import JRPdfExporter and SimplePdfExporterConfiguration for exporting PDF files. Did Jasper changed package name or be replaced with new class? I've tried to find out the release note but they tell no about them. Please give me some advices. Thanks in advance! Cheers! Rati --------- My current dependency: <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.21.3</version> </dependency> New dependency: <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>7.0.1</version> </dependency> Code: JRPdfExporter pdfExporter = new JRPdfExporter(); pdfExporter.setExporterInput(new SimpleExporterInput(jasperPrint)); pdfExporter.setExporterOutput(new SimpleOutputStreamExporterOutput(bos)); SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration(); pdfExporter.setConfiguration(configuration); pdfExporter.exportReport();
Solution ratipornl321 Posted October 9 Author Solution Posted October 9 I found the solution already! According to this that Quote In version 7, the functionality has been split into multiple optional JARs. So I imported this into POM and it works! <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports-pdf</artifactId> <version>7.0.1</version> </dependency>
lastresort Posted November 20 Posted November 20 You need the PDF dependency: <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports-pdf</artifactId> <version>7.0.1</version> </dependency>
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