Jump to content
We've recently updated our Privacy Statement, available here ×

How generate a non printable pdf


ktrinad

Recommended Posts

By: pjsebastian - pjsebastian

How generate a non printable pdf

2004-08-09 04:27

I 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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...