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

How to make PDF bookmark tree?


xzy_329

Recommended Posts

I print many JasperPrints together into one PDF file and set the param as below:

pdf.setParameter(JRPdfExporterParameter.IS_CREATING_BATCH_MODE_BOOKMARKS, true);

but the bookmarks are printed just one by one,how to make bookmark like attaching pic

 

by the way, can jasperreport make directory like Word doc?

 

thanks a lot!

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Hi, Lucian

Thank you for your reply,but now I still have another problem: the bookmarks are organized by template(jrxml) but not by whole report

for example, I prepare 3 template: A.jrxml, B.jrxml, C.jrxml,and JasperPrintA, JasperPrintB, JasperPrintC using template A, B, C. I add JasperPrintA, JasperPrintB, JasperPrintC  into a print list and set it to JRPdfExporterParameter.JASPER_PRINT_LIST

The bookmarks printed are organized by JasperPrintA, JasperPrintB and JasperPrintC seperately as below:

+ bookmarkA

+ bookmarkB

+ bookmarkC

What I want is like this:

- bookmarkA

   |- bookmarkB

   |- bookmarkC

I mean bookmarkA is the top level, and bookmarkB and bookmarkC are down level of bookmarkA

Could I Make that?

 

Waiting for your kindly reply and thank you in advance!

Link to comment
Share on other sites

The PDF exporter doesn't allow you to specify a bookmark hierarchy for the reports in JASPER_PRINT_LIST.  The exporter will always consider the reports in the list at the same level.

You can look into extending the PDF exporter to implement the functionality that you need.

Regards,

Lucian

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