goodidea Posted November 19, 2007 Share Posted November 19, 2007 I need to generate PDF document with prohibit select/copy text option. User should be able to print or read only. No any select text copy..paste features. Link to comment Share on other sites More sharing options...
martynhiemstra Posted November 20, 2007 Share Posted November 20, 2007 As far as I know, jasperreports generates pdf that cant have these limits. To do this you would need a special license from Adobe so that you may use a different version of pdf ( Where things are limited and allows editable fields etc ). This would make it impossible to release jasperreports for free since such a license is very, very expensive. Link to comment Share on other sites More sharing options...
itchytoes Posted November 22, 2007 Share Posted November 22, 2007 Hi -- Are you talking about disallowing the user to use the mouse and select sections of the pdf and copy it to be pasted elsewhere? I believe you can control some of that via JRPdfExporterParameter class, and the JRPdfExporterParameter.PERMISSIONS flag I have tried it to some extent and I believe I was able to prevent copying of the contents. Betty Link to comment Share on other sites More sharing options...
yyhor Posted March 3, 2009 Share Posted March 3, 2009 Hi,I also have the same problem as above mention.Can you show me any examples? This is because i have tried to use the PERMISSIONS flag but it didn't work...Thanks in advance~!!! =)Regards,yy Link to comment Share on other sites More sharing options...
C-Box Posted March 3, 2009 Share Posted March 3, 2009 Here you go (we allow just copy and printing) hthC-BoxCode:exporter.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE);exporter.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE);exporter.setParameter(JRPdfExporterParameter.USER_PASSWORD, "YourUserPW");exporter.setParameter(JRPdfExporterParameter.OWNER_PASSWORD, "YourOwnerPW");exporter.setParameter(JRPdfExporterParameter.PERMISSIONS,new Integer(PdfWriter.AllowCopy | PdfWriter.AllowPrinting)); Link to comment Share on other sites More sharing options...
yyhor Posted March 4, 2009 Share Posted March 4, 2009 Hi,Thanks for your prompt reply... =)It's worked to not allow copy but allow printing. I just use the script as the following:-exporter.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE);exporter.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE);exporter.setParameter(JRPdfExporterParameter.PERMISSIONS,new Integer(PdfWriter.AllowPrinting)); Thanks~!Regards,yy Link to comment Share on other sites More sharing options...
sridhar.m Posted August 23, 2016 Share Posted August 23, 2016 Hi CBoxwhere to add the code that u have given im new to the jasper report can u guide me 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