Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jasper PDF Export and PDF commenting property

 
Sergio Marcello
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I'm using Jasperreports to produces PDF files.

We need to edit the PDF files using Acrobat Viewer, and add the so named "annotations", that is, add pin notes on different places of the document (known also as "commenting").

The problem is, that the generated PDF from Jasper exporter, has this feature turned off - that is, property "commenting" is set to false.

The question: how to programatically turn that property on ?

I've tried with this code:


But the generated PDF file still has the "commenting" not available.

Any help would be greatly appreciated,
Sergio.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't just make up a name of a parameter to pass in the Map. Where did you get the parameter name "commenting" from?

By pin notes, do you mean tooltips?
 
Sergio Marcello
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "commenting" parameter comes from Acrobat. Opening a PDF file, and inspecting its properties, there's one that is named "commenting". On the PDF generated from Jasperreport, that property is set to false (commenting disabled).

And yes, I meant tooltips, however, I'm interested in making the commenting available.

Anyone ?
 
Sergio Marcello
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After further investigations, I've discovered that Acrobat Reader (AR) 8 reads the "commenting" feature as not available, while AR 10 reads the same property as available - having provided the same pdf file.

Go figure !

To summarize: the Jasper Report exported PDF file *is* "commenting capable" - but not in AR 8 - not sure about AR 9, but definitely possible in AR 10 (and in the AR Pro version too).

Problem solved - well, at this point I would say that it was not a problem at all

Sergio.

 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sergio

Unless I am mistaken, the name of properties you pass to the Exporter class do not map straight onto the properties of a PDF. Hence, I don't see a way you can do this programmatically by simply passing property values.

I did come across this forum post relating to tooltips however:

http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=64614&page=1
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic