This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Jasper PDF Export and PDF commenting property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Jasper PDF Export and PDF commenting property" Watch "Jasper PDF Export and PDF commenting property" New topic
Author

Jasper PDF Export and PDF commenting property

Sergio Marcello
Ranch Hand

Joined: Jun 20, 2008
Posts: 36
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.


SCJP 6
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 1012
    
    5

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

Joined: Jun 20, 2008
Posts: 36
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

Joined: Jun 20, 2008
Posts: 36
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

Joined: Nov 09, 2011
Posts: 1012
    
    5

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jasper PDF Export and PDF commenting property
 
Similar Threads
Help with Reporting on the Client
Java Printing Services API - Printing an Extra page in the beginning
PDF generate using jasper reports
simple jasper report in java without a database.
Generaet a specific PDF Version using Jasper