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

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


mertens.sylvain
Go to solution Solved by jgust,

Recommended Posts

Hello, 

I'm exporting my report to PDF and I'm trying to add metadata such as Title/Author/Subject/Keywor to the exported PDF. 

I don't have experience in java, I'm trying to configure the meta data through Jaspersoft Studio. I understand there is a specific library and several class for this purpose : https://net.sf.jasperreports.export.pdf.metadata.author/. 
What I don't understand is how to configure it through Jaspersoft Studio. 
In the file properties, I tried to configure the tab metadata in the PDF exporter but nothing was added to the PDF exported. 
I also try to configure a specific parameter with the class net.sf.jasperreports.export.Exporter but it doesn't work either. 

Thank for your help 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

If you want all PDF exports to have the same values you can set the values using the PDF export properties in Jasper Studio.

 

If you need each report to have its own set of values then you can add the property name to the jrxml file and set it there.

Link to comment
Share on other sites

Thank you for your answer. 
It works but only for the PDF, I can see in the PDF properties the metadata added in Jaspersoft studio but I can't display them in windows explorer. 

I think it's more a PDF-Windows issue than linked to Jaspersoft.

EDIT : As I was thinking, it's a windows and/or Pdf issue but I find a way to see the metadata in a windows explorer windows 

Everything is explain here https://answers.microsoft.com/en-us/windows/forum/all/cant-get-author-and-title-data-for-pdf-files-to/eb820921-3951-4f57-9f70-d1fa19a893ce 

The easiest way to see the pdf metadata is to "open the folder(s) containing your pdf files and type in 'pdf' in the search field at the upper right of Windows Explorer, then set your details view to Title, Author, etc. Crazy, but it works so long as you keep the search box set to pdf; as soon as you move to another folder, that metadata goes away until you re-enter 'pdf'" it's not perfect but it work. 

 

Link to comment
Share on other sites

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...