Jump to content

PDF Export: How to set Title/Author/Subject/Keywor


benoitx

Recommended Posts

Hello

We are exporting our JasperReport in PDF and I was wondering how it would be possible to set the following attributes that are visible through Acrobat Reader | Properties (see image pdf-export.PDF).

More specifically: the Title, Author, Subject and Keywords

We do the export as follows... How could pass these attributes to the exporter?

Many thanks!

Benoit

Code:
try {  final JRPdfExporter exporter = new JRPdfExporter();  final File destFile = new File(fileName);  exporter.setParameter(JRExporterParameter.JASPER_PRINT, report);  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.PERMISSIONS, new             Integer(PdfWriter.ALLOW_COPY | PdfWriter.ALLOW_PRINTING));  exporter.exportReport();...
Link to comment
Share on other sites

  • Replies 1
  • 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...