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

text from tinymce editor to jasper reports


fachhoch

Recommended Posts

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

Top Posters In This Topic

fachhoch
Wrote:

we use tinymce rich text editor  and the text from these editors goes to jasperreports pdf,   it displays all html code in generated pdf , isthere a way jasper can translate the html to pdf   format?

 

 

we are having the same problem... have you got any answer?

Link to comment
Share on other sites

The problem is table tags.

Markup property don't understand this tags.

There is other way to show a well formed table that can from a tinymce rich text editor?

 

Can i try to so a Component for do that? Maybe if someone give me some ligth about how to do, I will can try.

I will try to explain better, I only need to print an easy table with <td> and <tr> well formed, and nothing inside, only
transform the simple table tags. I want to create a Component that will do the change code from HTML to a way that Jasper
understand.

Maybe it's a lot and so diffcult work, but we can try to do if we have some light about how (and if it is possible).

Link to comment
Share on other sites


It is possible...it is complex yet.... provided you are generating reports programatically.

follow these steps.

create your component which will take input string as html table code parse it and convert it as jasper reable jrxml code output as  JRDesignElement object .

design report add a dummy comonent( eg. static text) where you want to see actual table.

assuming that you are calling report from java application... in that section you need to add following flow.

load jrxml   (jaspermanager/jrxmlloader  will load your jrxml and return you jasperdesign object.)

JasperDesign jasperDesign = JRXmlLoader.load(FileInputStream)

get jasperdesign object... this will gives all apis to get all components inside...

call apis to locate dummy component from jasperdesign remove that element and replace your new element.

then follow next steps of compiling..filling... exporting to desired output...

 

Rajendra Tambat

 

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