ktrinad Posted August 20, 2006 Share Posted August 20, 2006 By: pjsebastian - pjsebastian How generate a non printable pdf 2004-08-09 04:27I use runReporttopdf to generate a pdf I would like this pdf was non printable but i check the "pdf encrypt" sample provider and there not use a runreporttopdf to generate a pdf It uses Jasper print and a file destFile and JrPdfexporter and there it put exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE, destFile); exporter.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE); exporter.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE); exporter.setParameter(JRPdfExporterParameter.USER_PASSWORD, "jasper"); exporter.setParameter(JRPdfExporterParameter.OWNER_PASSWORD, "reports"); exporter.setParameter( JRPdfExporterParameter.PERMISSIONS, new Integer(PdfWriter.AllowCopy | PdfWriter.AllowPrinting)); exporter.exportReport(); And I wonder some way it is possible to do this if i use runReporttopdf and not use jasper print and a and a file destFile thanks and regards, --Pedro 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