leticia.l.silva Posted December 19, 2022 Posted December 19, 2022 Como faço para adicionar esta biblioteca no meu projeto ?Pois quando vou gerar meu PDF/A , ele diz que : Adobe XMP library not foundEste e o meu codigo List<Aluno> alunos = alunoRepository.findAll(); File file = ResourceUtils.getFile("src/main/resources/aluno.jrxml"); JasperReport jasperReport = JasperCompileManager.compileReport(file.getAbsolutePath()); JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(alunos); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap<>(), dataSource); JRPdfExporter pdfExporter = new JRPdfExporter(); pdfExporter.setExporterInput(new SimpleExporterInput(jasperPrint)); pdfExporter.setExporterOutput(new SimpleOutputStreamExporterOutput(new FileBufferedOutputStream())); SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration(); configuration.setPdfaConformance(PdfaConformanceEnum.PDFA_1A); configuration.setIccProfilePath("src/main/resources/icc/sRGB_IEC61966-2-1_black_scaled.icc"); setDefaultPdfFontEmbedded(); pdfExporter.setConfiguration(configuration); pdfExporter.exportReport(); { } return ("PDF/A criado com sucesso !"); }}
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