fachhoch Posted October 26, 2009 Share Posted October 26, 2009 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? Link to comment Share on other sites More sharing options...
scgonzaleza Posted February 18, 2011 Share Posted February 18, 2011 fachhochWrote: 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 More sharing options...
rajendratambat Posted February 21, 2011 Share Posted February 21, 2011 in jasperreport you can set text field markup property as "styled/html" which will treat your html code as data appropriately... have you tried this?Rajendra Tambat Link to comment Share on other sites More sharing options...
santiagovn Posted February 21, 2011 Share Posted February 21, 2011 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 More sharing options...
rajendratambat Posted February 22, 2011 Share Posted February 22, 2011 can you elaborate it in greater detail what is expected if possible with input sample and jrxml also with expected output sample...along with explanation.Rajendra Tambat Link to comment Share on other sites More sharing options...
santiagovn Posted February 22, 2011 Share Posted February 22, 2011 Ok i will try.If we have a table like this: Code: And I want something like this in the report: Code: Thanks in advancePost Edited by santiagovn at 02/22/2011 10:45 Link to comment Share on other sites More sharing options...
rajendratambat Posted February 23, 2011 Share Posted February 23, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now