Jump to content
Changes to the Jaspersoft community edition download ×

Clubbing multiple reports into a single PDF ?


2004 IR Help

Recommended Posts

By: satya400 - satya400

Clubbing multiple reports into a single PDF ?

2005-12-28 22:58

 

I have a requirment to club the output of three reports and export it to a single PDF file. All the 3 reports have different layouts, headers and footers, so i am not able to put them into sub reports.

 

Is there any way to combine the output and export into a single pdf?

 

Thanks In Advance

Satya

 

 

 

 

 

By: David Heffelfinger - heffel

RE: Clubbing multiple reports into a single PDF ?

2005-12-29 06:38

You cannot do that directly in JasperReports. Perhaps you can accomplish it by using a PDF manipulation library like iText (JR uses iText to generate PDF reports).

 

 

 

 

By: satya400 - satya400

RE: Clubbing multiple reports into a single PDF ?

2005-12-30 02:07

Thanks a lot , i did it using iText.

Satya

 

 

 

 

By: C-Box - c-box

RE: Clubbing multiple reports into a single P

2005-12-30 02:00

Of course it's possible... we do so, to print multiple (different) docs that are logical linked together in our ERP-System to get just ONE PDF (e.g. for eMail output)....

 

here my way:

 

1.) create a new JasperPrint Object (give it a name like "mergedDocs")

2.) loop through all your filled JasperPrints

3.) for each JasperPrint get each page

4.) add each Page to the JasperPrint Object (you have created in point 1)

5.) add each used font (if different fonts exists) to the JasperPrint Object. (note... the "getFontsList is deprecated since 1.0.1 --> use getStyles for new version)

6.) return that merged JasperPrint (that contains ALL pages of ALL single JasperPrints).

7.) export that JasperPrint to a single PDF.

 

that's all!

Works great for me... (just the orienatation could make trouble - if differently, or differnt PaperSizes -> but in my case it's always the same.... so perhaps it doesn't interest you also!?!)

 

hth + a happy new year

C-Box

 

 

 

 

 

By: satya400 - satya400

RE: Clubbing multiple reports into a single P

2005-12-30 02:08

Wow, let me try it out.

 

Happy new Year

 

Thanks

Satya

 

 

 

 

 

By: satya400 - satya400

RE: Clubbing multiple reports into a single P

2005-12-30 05:32

Thanks it worked and met my needs.

 

Satya

Link to comment
Share on other sites

  • 6 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Is it possible to read an existing PDF, and then add other filled JasperPrint content to be appended to it? What I need is to add a PDF input stream to a report, and then add more content to it. Any help would be appreciated.

 

Thanks.

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